org.apache.lucene.search.suggest.fst
Class Sort.ByteSequencesWriter
java.lang.Object
org.apache.lucene.search.suggest.fst.Sort.ByteSequencesWriter
- All Implemented Interfaces:
- Closeable
- 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 to Sort.ByteSequencesReader
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sort.ByteSequencesWriter
public Sort.ByteSequencesWriter(File file)
throws IOException
- Throws:
IOException
Sort.ByteSequencesWriter
public Sort.ByteSequencesWriter(DataOutput os)
write
public void write(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 IOException
- Closes the provided
DataOutput
if it is Closeable
.
- Specified by:
close
in interface Closeable
- Throws:
IOException