Package org.apache.lucene.search.suggest
Class Sort.ByteSequencesWriter
java.lang.Object
org.apache.lucene.search.suggest.Sort.ByteSequencesWriter
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
Sort
Utility class to emit length-prefixed byte[] entries to an output stream for sorting.
Complementary to
Sort.ByteSequencesReader.-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a ByteSequencesWriter to the provided DataOutputByteSequencesWriter(File file) Constructs a ByteSequencesWriter to the provided File -
Method Summary
-
Constructor Details
-
ByteSequencesWriter
Constructs a ByteSequencesWriter to the provided File- Throws:
IOException
-
ByteSequencesWriter
Constructs a ByteSequencesWriter to the provided DataOutput
-
-
Method Details
-
write
Writes a BytesRef.- Throws:
IOException- See Also:
-
write
Writes a byte array.- Throws:
IOException- See Also:
-
write
Writes a byte array.The length is written as a
short, followed by the bytes.- Throws:
IOException
-
close
Closes the providedDataOutputif it isCloseable.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-