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(File file)
Constructs a ByteSequencesReader from the provided File
|
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(File file) throws IOException
IOException
public 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.IOException
public 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.IOException
read(BytesRefBuilder)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.