Package org.apache.lucene.util.bkd
Class HeapPointReader
- java.lang.Object
-
- org.apache.lucene.util.bkd.HeapPointReader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,PointReader
public final class HeapPointReader extends java.lang.Object implements PointReader
Utility class to read buffered points from in-heap arrays.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
HeapPointReader.HeapPointValue
Reusable implementation for a point value on-heap
-
Field Summary
Fields Modifier and Type Field Description (package private) byte[]
block
private int
curRead
(package private) int
end
(package private) int
packedBytesDocIDLength
(package private) int
packedBytesLength
private HeapPointReader.HeapPointValue
pointValue
-
Constructor Summary
Constructors Constructor Description HeapPointReader(byte[] block, int packedBytesLength, int start, int end)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
next()
Returns false once iteration is done, else true.PointValue
pointValue()
Sets the packed value in the provided ByteRef
-
-
-
Field Detail
-
curRead
private int curRead
-
block
final byte[] block
-
packedBytesLength
final int packedBytesLength
-
packedBytesDocIDLength
final int packedBytesDocIDLength
-
end
final int end
-
pointValue
private final HeapPointReader.HeapPointValue pointValue
-
-
Method Detail
-
next
public boolean next()
Description copied from interface:PointReader
Returns false once iteration is done, else true.- Specified by:
next
in interfacePointReader
-
pointValue
public PointValue pointValue()
Description copied from interface:PointReader
Sets the packed value in the provided ByteRef- Specified by:
pointValue
in interfacePointReader
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-