Class ReleasableBytesStreamOutput

All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, org.elasticsearch.core.Releasable

public class ReleasableBytesStreamOutput extends BytesStreamOutput implements org.elasticsearch.core.Releasable
An bytes stream output that allows providing a BigArrays instance expecting it to require releasing its content (BytesStreamOutput.bytes()) once done.

Please note, closing this stream will release the bytes that are in use by any ReleasableBytesReference returned from BytesStreamOutput.bytes(), so this stream should only be closed after the bytes have been output or copied elsewhere.

  • Constructor Details

    • ReleasableBytesStreamOutput

      public ReleasableBytesStreamOutput(BigArrays bigarrays)
    • ReleasableBytesStreamOutput

      public ReleasableBytesStreamOutput(int expectedSize, BigArrays bigArrays)
  • Method Details