Class HadoopSeekableInputStream
Object
java.io.InputStream
io.delta.kernel.defaults.engine.fileio.SeekableInputStream
io.delta.kernel.defaults.engine.hadoopio.HadoopSeekableInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionHadoopSeekableInputStream(org.apache.hadoop.fs.FSDataInputStream delegateStream) -
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()longgetPos()Get the current position in the stream.intread()intread(byte[] b) intread(byte[] b, int off, int len) voidreadFully(byte[] b, int off, int len) Read fully len bytes into the buffer b.voidseek(long pos) Seek to a new position in the stream.longskip(long n) Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, transferTo
-
Constructor Details
-
HadoopSeekableInputStream
public HadoopSeekableInputStream(org.apache.hadoop.fs.FSDataInputStream delegateStream)
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
seek
Description copied from class:SeekableInputStreamSeek to a new position in the stream.- Specified by:
seekin classSeekableInputStream- Parameters:
pos- the new position to seek to- Throws:
IOException- if the underlying stream throws an IOException
-
getPos
Description copied from class:SeekableInputStreamGet the current position in the stream.- Specified by:
getPosin classSeekableInputStream- Returns:
- the current position in bytes from the start of the stream
- Throws:
IOException- if the underlying stream throws an IOException
-
readFully
Description copied from class:SeekableInputStreamRead fully len bytes into the buffer b.- Specified by:
readFullyin classSeekableInputStream- Parameters:
b- byte arrayoff- offset in the byte arraylen- number of bytes to read- Throws:
IOException- – the stream has been closed and the contained input stream does not support reading after close, or another I/ O error occurs.
-