public class ReleasableBytesStreamOutput extends BytesStreamOutput implements Releasable
BigArrays instance
expecting it to require releasing its content (bytes()) once done.
Please note, closing this stream will release the bytes that are in use by any
ReleasablePagedBytesReference returned from bytes(), so this
stream should only be closed after the bytes have been output or copied
elsewhere.
bigArrays, bytes, count| Constructor and Description |
|---|
ReleasableBytesStreamOutput(BigArrays bigarrays) |
ReleasableBytesStreamOutput(int expectedSize,
BigArrays bigArrays) |
| Modifier and Type | Method and Description |
|---|---|
ReleasablePagedBytesReference |
bytes()
Returns a
Releasable implementation of a
BytesReference that represents the current state of
the bytes in the stream. |
void |
close()
Closes this stream to further operations.
|
void |
reset() |
flush, position, ramBytesUsed, seek, size, skip, writeByte, writeBytesgetVersion, setVersion, write, write, writeArray, writeArray, writeBoolean, writeByteArray, writeBytes, writeBytes, writeBytesRef, writeBytesReference, writeDouble, writeDoubleArray, writeEnum, writeException, writeFloat, writeFloatArray, writeGenericValue, writeGeoPoint, writeInt, writeIntArray, writeList, writeLong, writeLongArray, writeMap, writeMap, writeMapOfLists, writeMapWithConsistentOrder, writeNamedWriteable, writeNamedWriteableList, writeOptionalArray, writeOptionalBoolean, writeOptionalBytesReference, writeOptionalDouble, writeOptionalFloat, writeOptionalLong, writeOptionalNamedWriteable, writeOptionalStreamable, writeOptionalString, writeOptionalStringArray, writeOptionalText, writeOptionalTimeZone, writeOptionalVInt, writeOptionalWriteable, writeShort, writeStreamableList, writeString, writeStringArray, writeStringArrayNullable, writeStringList, writeText, writeTimeZone, writeVInt, writeVIntArray, writeVLong, writeVLongArray, writeZLongpublic ReleasableBytesStreamOutput(BigArrays bigarrays)
public ReleasableBytesStreamOutput(int expectedSize,
BigArrays bigArrays)
public ReleasablePagedBytesReference bytes()
Releasable implementation of a
BytesReference that represents the current state of
the bytes in the stream.bytes in class BytesStreamOutputpublic void close()
StreamOutputclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface Releasableclose in class BytesStreamOutputpublic void reset()
reset in class BytesStreamOutput