Package org.apache.lucene.util
Class OfflineSorter.ByteSequencesWriter
java.lang.Object
org.apache.lucene.util.OfflineSorter.ByteSequencesWriter
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
- OfflineSorter
Utility class to emit length-prefixed byte[] entries to an output stream for sorting.
Complementary to
OfflineSorter.ByteSequencesReader
. You must use CodecUtil.writeFooter(org.apache.lucene.store.IndexOutput)
to
write a footer at the end of the input file.-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructs a ByteSequencesWriter to the provided DataOutput -
Method Summary
-
Field Details
-
out
-
-
Constructor Details
-
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 providedIndexOutput
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-