public static class OfflineSorter.ByteSequencesReader extends java.lang.Object implements BytesRefIterator, java.io.Closeable
OfflineSorter.ByteSequencesWriter
.Modifier and Type | Field and Description |
---|---|
protected long |
end |
protected ChecksumIndexInput |
in |
protected java.lang.String |
name |
private BytesRefBuilder |
ref |
EMPTY
Constructor and Description |
---|
ByteSequencesReader(ChecksumIndexInput in,
java.lang.String name)
Constructs a ByteSequencesReader from the provided IndexInput
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the provided
IndexInput . |
BytesRef |
next()
Reads the next entry into the provided
BytesRef . |
protected final java.lang.String name
protected final ChecksumIndexInput in
protected final long end
private final BytesRefBuilder ref
public ByteSequencesReader(ChecksumIndexInput in, java.lang.String name)
public BytesRef next() throws java.io.IOException
BytesRef
. The internal
storage is resized if needed.next
in interface BytesRefIterator
false
if EOF occurred when trying to read
the header of the next sequence. Returns true
otherwise.java.io.EOFException
- if the file ends before the full sequence is read.java.io.IOException
- If there is a low-level I/O error.public void close() throws java.io.IOException
IndexInput
.close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException