Class Sort.ByteSequencesWriter
- java.lang.Object
-
- org.apache.lucene.search.suggest.fst.Sort.ByteSequencesWriter
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
- Sort
public static class Sort.ByteSequencesWriter extends Object implements Closeable
Utility class to emit length-prefixed byte[] entries to an output stream for sorting. Complementary toSort.ByteSequencesReader.
-
-
Constructor Summary
Constructors Constructor Description ByteSequencesWriter(DataOutput os)ByteSequencesWriter(File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the providedDataOutputif it isCloseable.voidwrite(byte[] bytes)voidwrite(byte[] bytes, int off, int len)voidwrite(org.apache.lucene.util.BytesRef ref)
-
-
-
Constructor Detail
-
ByteSequencesWriter
public ByteSequencesWriter(File file) throws IOException
- Throws:
IOException
-
ByteSequencesWriter
public ByteSequencesWriter(DataOutput os)
-
-
Method Detail
-
write
public void write(org.apache.lucene.util.BytesRef ref) throws IOException- Throws:
IOException
-
write
public void write(byte[] bytes) throws IOException- Throws:
IOException
-
write
public void write(byte[] bytes, int off, int len) throws IOException- Throws:
IOException
-
close
public void close() throws IOExceptionCloses the providedDataOutputif it isCloseable.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-