Package org.apache.parquet.bytes
Class ByteBufferInputStream
java.lang.Object
java.io.InputStream
org.apache.parquet.bytes.ByteBufferInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionByteBufferInputStream(ByteBuffer buffer) Deprecated.ByteBufferInputStream(ByteBuffer buffer, int offset, int count) Deprecated.Will be removed in 2.0.0; Usewrap(ByteBuffer...)instead -
Method Summary
Modifier and TypeMethodDescriptionintvoidmark(int readlimit) booleanlongposition()intread()intread(byte[] b, int off, int len) intread(ByteBuffer out) voidreset()longskip(long n) voidskipFully(long n) slice(int length) sliceBuffers(long length) sliceStream(long length) Deprecated.Will be removed in 2.0.0; Useslice(int)insteadstatic ByteBufferInputStreamwrap(ByteBuffer... buffers) static ByteBufferInputStreamwrap(List<ByteBuffer> buffers) Methods inherited from class java.io.InputStream
close, nullInputStream, read, readAllBytes, readNBytes, readNBytes, transferTo
-
Constructor Details
-
ByteBufferInputStream
Deprecated.Will be removed in 2.0.0; Usewrap(ByteBuffer...)instead- Parameters:
buffer- the buffer to be wrapped in this input stream
-
ByteBufferInputStream
Deprecated.Will be removed in 2.0.0; Usewrap(ByteBuffer...)instead- Parameters:
buffer- the buffer to be wrapped in this input streamoffset- the offset of the data in the buffercount- the number of bytes to be read from the buffer
-
-
Method Details
-
wrap
-
wrap
-
toByteBuffer
Deprecated.Will be removed in 2.0.0; Useslice(int)instead- Returns:
- the slice of the byte buffer inside this stream
-
position
public long position() -
skipFully
- Throws:
IOException
-
read
-
slice
- Throws:
EOFException
-
sliceBuffers
- Throws:
EOFException
-
sliceStream
- Throws:
EOFException
-
remainingBuffers
-
remainingStream
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
public long skip(long n) - Overrides:
skipin classInputStream
-
available
public int available()- Overrides:
availablein classInputStream
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
wrap(ByteBuffer...)instead