|
|||||||||
| 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.ByteSequencesWriter
public static class Sort.ByteSequencesWriter
Utility class to emit length-prefixed byte[] entries to an output stream for sorting.
Complementary to Sort.ByteSequencesReader.
| Constructor Summary | |
|---|---|
Sort.ByteSequencesWriter(DataOutput os)
Constructs a ByteSequencesWriter to the provided DataOutput |
|
Sort.ByteSequencesWriter(File file)
Constructs a ByteSequencesWriter to the provided File |
|
| Method Summary | |
|---|---|
void |
close()
Closes the provided DataOutput if it is Closeable. |
void |
write(byte[] bytes)
Writes a byte array. |
void |
write(byte[] bytes,
int off,
int len)
Writes a byte array. |
void |
write(BytesRef ref)
Writes a BytesRef. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Sort.ByteSequencesWriter(File file)
throws IOException
IOExceptionpublic Sort.ByteSequencesWriter(DataOutput os)
| Method Detail |
|---|
public void write(BytesRef ref)
throws IOException
IOExceptionwrite(byte[], int, int)
public void write(byte[] bytes)
throws IOException
IOExceptionwrite(byte[], int, int)
public void write(byte[] bytes,
int off,
int len)
throws IOException
The length is written as a short, followed
by the bytes.
IOException
public void close()
throws IOException
DataOutput if it is Closeable.
close in interface CloseableIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||