|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.search.suggest.fst.Sort.ByteSequencesReader
public static class Sort.ByteSequencesReader
Utility class to read length-prefixed byte[] entries from an input.
Complementary to Sort.ByteSequencesWriter.
| Constructor Summary | |
|---|---|
Sort.ByteSequencesReader(DataInput is)
|
|
Sort.ByteSequencesReader(File file)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the provided DataInput if it is Closeable. |
byte[] |
read()
Reads the next entry and returns it if successful. |
boolean |
read(BytesRef ref)
Reads the next entry into the provided BytesRef. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Sort.ByteSequencesReader(File file)
throws IOException
IOExceptionpublic Sort.ByteSequencesReader(DataInput is)
| Method Detail |
|---|
public boolean read(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.
IOExceptionread(BytesRef)
public void close()
throws IOException
DataInput if it is Closeable.
close in interface CloseableIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||