Package org.apache.iceberg.io
Class SeekableInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.iceberg.io.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.
-
-
Constructor Summary
Constructors Constructor Description 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.
-
-
-
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
-
-