public static class OfflineSorter.ByteSequencesWriter
extends java.lang.Object
implements java.io.Closeable
OfflineSorter.ByteSequencesReader
. You must use CodecUtil.writeFooter(org.apache.lucene.store.IndexOutput)
to write a footer at the end of the input file.Modifier and Type | Field and Description |
---|---|
protected IndexOutput |
out |
Constructor and Description |
---|
ByteSequencesWriter(IndexOutput out)
Constructs a ByteSequencesWriter to the provided DataOutput
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the provided
IndexOutput . |
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.
|
protected final IndexOutput out
public ByteSequencesWriter(IndexOutput out)
public final void write(BytesRef ref) throws java.io.IOException
java.io.IOException
write(byte[], int, int)
public final void write(byte[] bytes) throws java.io.IOException
java.io.IOException
write(byte[], int, int)
public void write(byte[] bytes, int off, int len) throws java.io.IOException
The length is written as a short
, followed
by the bytes.
java.io.IOException
public void close() throws java.io.IOException
IndexOutput
.close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.