Package org.apache.lucene.util
Class IntBlockPool.SliceReader
java.lang.Object
org.apache.lucene.util.IntBlockPool.SliceReader
- Enclosing class:
- IntBlockPool
A
IntBlockPool.SliceReader
that can read int slices written by a IntBlockPool.SliceWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[]
private int
private int
private int
private int
private int
private final IntBlockPool
private int
-
Constructor Summary
ConstructorsConstructorDescriptionSliceReader
(IntBlockPool pool) Creates a newIntBlockPool.SliceReader
on the given pool -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
iff the current slice is fully read.private void
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
-
Field Details
-
pool
-
upto
private int upto -
bufferUpto
private int bufferUpto -
bufferOffset
private int bufferOffset -
buffer
private int[] buffer -
limit
private int limit -
level
private int level -
end
private int end
-
-
Constructor Details
-
SliceReader
Creates a newIntBlockPool.SliceReader
on the given pool
-
-
Method Details
-
reset
public void reset(int startOffset, int endOffset) Resets the reader to a slice give the slices absolute start and end offset in the pool -
endOfSlice
public boolean endOfSlice()Returnstrue
iff the current slice is fully read. If this method returnstrue
readInt()
should not be called again on this slice. -
readInt
public int readInt()Reads the next int from the current slice and returns it.- See Also:
-
nextSlice
private void nextSlice()
-