public class SegmentReader extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SegmentReader.State |
| Modifier and Type | Field and Description |
|---|---|
protected int |
curMarker |
protected boolean |
done |
| Constructor and Description |
|---|
SegmentReader(ReadableByteChannel channel,
int fetchSize) |
| Modifier and Type | Method and Description |
|---|---|
long |
curPos() |
int |
getBufferIncrement() |
boolean |
read(ByteBuffer out,
int length) |
boolean |
readToNextMarker(ByteBuffer out) |
void |
readToNextMarkerBuffers(List<ByteBuffer> buffers) |
ByteBuffer |
readToNextMarkerNewBuffer()
Reads one full segment till the next marker.
|
SegmentReader.State |
readToNextMarkerPartial(ByteBuffer out)
Reads one full segment till the next marker.
|
void |
setBufferIncrement(int bufferIncrement) |
boolean |
skipToMarker() |
public SegmentReader(ReadableByteChannel channel, int fetchSize) throws IOException
IOExceptionpublic int getBufferIncrement()
public void setBufferIncrement(int bufferIncrement)
public final SegmentReader.State readToNextMarkerPartial(ByteBuffer out) throws IOException
out - IOExceptionpublic ByteBuffer readToNextMarkerNewBuffer() throws IOException
IOExceptionpublic void readToNextMarkerBuffers(List<ByteBuffer> buffers) throws IOException
IOExceptionpublic final boolean readToNextMarker(ByteBuffer out) throws IOException
IOExceptionpublic final boolean skipToMarker()
throws IOException
IOExceptionpublic final boolean read(ByteBuffer out, int length) throws IOException
IOExceptionpublic final long curPos()
Copyright © 2019. All rights reserved.