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
IOException
public int getBufferIncrement()
public void setBufferIncrement(int bufferIncrement)
public final SegmentReader.State readToNextMarkerPartial(ByteBuffer out) throws IOException
out
- IOException
public ByteBuffer readToNextMarkerNewBuffer() throws IOException
IOException
public void readToNextMarkerBuffers(List<ByteBuffer> buffers) throws IOException
IOException
public final boolean readToNextMarker(ByteBuffer out) throws IOException
IOException
public final boolean skipToMarker() throws IOException
IOException
public final boolean read(ByteBuffer out, int length) throws IOException
IOException
public final long curPos()
Copyright © 2019. All rights reserved.