public static final class IntBlockPool.SliceReader
extends java.lang.Object
IntBlockPool.SliceReader
that can read int slices written by a IntBlockPool.SliceWriter
Modifier and Type | Field and Description |
---|---|
private int[] |
buffer |
private int |
bufferOffset |
private int |
bufferUpto |
private int |
end |
private int |
level |
private int |
limit |
private IntBlockPool |
pool |
private int |
upto |
Constructor and Description |
---|
SliceReader(IntBlockPool pool)
Creates a new
IntBlockPool.SliceReader on the given pool |
Modifier and Type | Method and Description |
---|---|
boolean |
endOfSlice()
Returns
true iff the current slice is fully read. |
private void |
nextSlice() |
int |
readInt()
Reads the next int from the current slice and returns it.
|
void |
reset(int startOffset,
int endOffset)
Resets the reader to a slice give the slices absolute start and end offset in the pool
|
private final IntBlockPool pool
private int upto
private int bufferUpto
private int bufferOffset
private int[] buffer
private int limit
private int level
private int end
public SliceReader(IntBlockPool pool)
IntBlockPool.SliceReader
on the given poolpublic void reset(int startOffset, int endOffset)
public boolean endOfSlice()
true
iff the current slice is fully read. If this
method returns true
readInt()
should not
be called again on this slice.public int readInt()
endOfSlice()
private void nextSlice()