Closeable
, AutoCloseable
public static class Sort.ByteSequencesReader extends Object implements Closeable
Sort.ByteSequencesWriter
.Constructor | Description |
---|---|
ByteSequencesReader(DataInput is) |
|
ByteSequencesReader(File file) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
byte[] |
read() |
Reads the next entry and returns it if successful.
|
boolean |
read(org.apache.lucene.util.BytesRef ref) |
Reads the next entry into the provided
BytesRef . |
public ByteSequencesReader(File file) throws IOException
IOException
public ByteSequencesReader(DataInput is)
public boolean read(org.apache.lucene.util.BytesRef 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(BytesRef)
public void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
IOException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.