Class ReleasableBytesStreamOutput

java.lang.Object
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable, Releasable

public class ReleasableBytesStreamOutput
extends BytesStreamOutput
implements Releasable
An bytes stream output that allows providing a 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 ReleasableBytesReference returned from bytes(), so this stream should only be closed after the bytes have been output or copied elsewhere.