Class ByteBufferWriterOutputStream

java.lang.Object
java.io.OutputStream
org.apache.hadoop.hbase.io.ByteBufferWriterOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, ByteBufferWriter

@Private public class ByteBufferWriterOutputStream extends OutputStream implements ByteBufferWriter
When deal with OutputStream which is not ByteBufferWriter type, wrap it with this class. We will have to write offheap ByteBuffer (DBB) data into the OS. This class is having a temp byte array to which we can copy the DBB data for writing to the OS.
This is used while writing Cell data to WAL. In case of AsyncWAL, the OS created there is ByteBufferWriter. But in case of FSHLog, the OS passed by DFS client, is not of type ByteBufferWriter. We will need this temp solution until DFS client supports writing ByteBuffer directly to the OS it creates.
Note: This class is not thread safe.