public static class OfflineSorter.ByteSequencesWriter extends Object implements Closeable
OfflineSorter.ByteSequencesReader.| Constructor and Description |
|---|
ByteSequencesWriter(DataOutput os)
Constructs a ByteSequencesWriter to the provided DataOutput
|
ByteSequencesWriter(Path path)
Constructs a ByteSequencesWriter to the provided Path
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public ByteSequencesWriter(Path path) throws IOException
IOExceptionpublic ByteSequencesWriter(DataOutput os)
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.
IOExceptionpublic void close()
throws IOException
DataOutput if it is Closeable.close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.