Class SeekableInputStream

java.lang.Object
java.io.InputStream
org.apache.iceberg.io.SeekableInputStream
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
AesGcmInputStream, ByteBufferInputStream

public abstract class SeekableInputStream extends InputStream
SeekableInputStream is an interface with the methods needed to read data from a file or Hadoop data stream.

This class is based on Parquet's SeekableInputStream.

  • Constructor Details

    • SeekableInputStream

      public SeekableInputStream()
  • Method Details

    • getPos

      public abstract long getPos() throws IOException
      Return the current position in the InputStream.
      Returns:
      current position in bytes from the start of the stream
      Throws:
      IOException - If the underlying stream throws IOException
    • seek

      public abstract void seek(long newPos) throws IOException
      Seek to a new position in the InputStream.
      Parameters:
      newPos - the new position to seek to
      Throws:
      IOException - If the underlying stream throws IOException