Package org.apache.lucene.util.bkd
Class OfflinePointReader
- java.lang.Object
-
- org.apache.lucene.util.bkd.OfflinePointReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,PointReader
public final class OfflinePointReader extends java.lang.Object implements PointReader
Reads points from disk in a fixed-with format, previously written withOfflinePointWriter.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classOfflinePointReader.OfflinePointValueReusable implementation for a point value offline
-
Field Summary
Fields Modifier and Type Field Description private booleancheckedprivate BKDConfigconfig(package private) longcountLeft(package private) IndexInputinprivate intmaxPointOnHeap(package private) java.lang.Stringname(package private) intoffset(package private) byte[]onHeapBufferprivate intpointsInBufferprivate OfflinePointReader.OfflinePointValuepointValue
-
Constructor Summary
Constructors Constructor Description OfflinePointReader(BKDConfig config, Directory tempDir, java.lang.String tempFileName, long start, long length, byte[] reusableBuffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleannext()Returns false once iteration is done, else true.PointValuepointValue()Sets the packed value in the provided ByteRef
-
-
-
Field Detail
-
countLeft
long countLeft
-
in
final IndexInput in
-
onHeapBuffer
byte[] onHeapBuffer
-
offset
int offset
-
checked
private boolean checked
-
config
private final BKDConfig config
-
pointsInBuffer
private int pointsInBuffer
-
maxPointOnHeap
private final int maxPointOnHeap
-
name
final java.lang.String name
-
pointValue
private final OfflinePointReader.OfflinePointValue pointValue
-
-
Method Detail
-
next
public boolean next() throws java.io.IOExceptionDescription copied from interface:PointReaderReturns false once iteration is done, else true.- Specified by:
nextin interfacePointReader- Throws:
java.io.IOException
-
pointValue
public PointValue pointValue()
Description copied from interface:PointReaderSets the packed value in the provided ByteRef- Specified by:
pointValuein interfacePointReader
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-