Class WriteOutBytes

java.lang.Object
java.io.OutputStream
org.apache.druid.segment.writeout.WriteOutBytes
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, Channel, WritableByteChannel
Direct Known Subclasses:
ByteBufferWriteOutBytes, FileWriteOutBytes, LazilyAllocatingHeapWriteOutBytes

public abstract class WriteOutBytes extends OutputStream implements WritableByteChannel
Appendable byte sequence for temporary storage. Methods inherited from OutputStream, WritableByteChannel and writeInt(int) append to the sequence. Methods writeTo(WritableByteChannel) and asInputStream() allow to write the sequence somewhere else. readFully(long, java.nio.ByteBuffer) allows to access the sequence randomly.

WriteOutBytes is a resource that is managed by SegmentWriteOutMedium, so it's own close() method does nothing. However WriteOutBytes should appear closed, i. e. Channel.isOpen() returns false, after the parental SegmentWriteOutMedium is closed.

  • Constructor Details

    • WriteOutBytes

      public WriteOutBytes()
  • Method Details