Class SeekableInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    AesGcmInputStream, ByteBufferInputStream

    public abstract class SeekableInputStream
    extends java.io.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.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract long getPos()
      Return the current position in the InputStream.
      abstract void seek​(long newPos)
      Seek to a new position in the InputStream.
      • Methods inherited from class java.io.InputStream

        available, close, mark, markSupported, nullInputStream, read, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SeekableInputStream

        public SeekableInputStream()
    • Method Detail

      • getPos

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

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