public static class Sort.ByteSequencesReader
extends java.lang.Object
implements java.io.Closeable
Sort.ByteSequencesWriter.| Constructor and Description |
|---|
ByteSequencesReader(java.io.DataInput is) |
ByteSequencesReader(java.io.File file) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the provided
DataInput if it is Closeable. |
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(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic ByteSequencesReader(java.io.DataInput is)
public boolean read(org.apache.lucene.util.BytesRef ref)
throws java.io.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.java.io.EOFException - if the file ends before the full sequence is read.java.io.IOExceptionpublic byte[] read()
throws java.io.IOException
null if EOF occurred before the next entry
could be read.java.io.EOFException - if the file ends before the full sequence is read.java.io.IOExceptionread(BytesRef)public void close()
throws java.io.IOException
DataInput if it is Closeable.close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionCopyright © 2000-2022 Apache Software Foundation. All Rights Reserved.