Package org.apache.lucene.util
Class IntBlockPool.SliceReader
- java.lang.Object
-
- org.apache.lucene.util.IntBlockPool.SliceReader
-
- Enclosing class:
- IntBlockPool
public static final class IntBlockPool.SliceReader extends java.lang.Object
AIntBlockPool.SliceReader
that can read int slices written by aIntBlockPool.SliceWriter
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description SliceReader(IntBlockPool pool)
Creates a newIntBlockPool.SliceReader
on the given pool
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
endOfSlice()
Returnstrue
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
-
-
-
Field Detail
-
pool
private final IntBlockPool 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 Detail
-
SliceReader
public SliceReader(IntBlockPool pool)
Creates a newIntBlockPool.SliceReader
on the given pool
-
-
Method Detail
-
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:
endOfSlice()
-
nextSlice
private void nextSlice()
-
-