public static class OfflineSorter.ByteSequencesReader extends Object implements Closeable
OfflineSorter.ByteSequencesWriter.| Constructor and Description |
|---|
OfflineSorter.ByteSequencesReader(DataInput is)
Constructs a ByteSequencesReader from the provided DataInput
|
OfflineSorter.ByteSequencesReader(Path path)
Constructs a ByteSequencesReader from the provided Path
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
|
byte[] |
read()
Reads the next entry and returns it if successful.
|
boolean |
read(BytesRefBuilder ref)
Reads the next entry into the provided
BytesRef. |
public OfflineSorter.ByteSequencesReader(Path path) throws IOException
IOExceptionpublic OfflineSorter.ByteSequencesReader(DataInput is)
public boolean read(BytesRefBuilder ref) throws IOException
BytesRef. The internal
storage is resized if needed.false if EOF occurred when trying to read
the header of the next sequence. Returns true otherwise.EOFException - if the file ends before the full sequence is read.IOExceptionpublic byte[] read()
throws IOException
null if EOF occurred before the next entry
could be read.EOFException - if the file ends before the full sequence is read.IOExceptionread(BytesRefBuilder)public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.