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.
Writes len bytes from the specified ByteBuffer starting at offset off to
this OutputStream. If b is null, a NullPointerException is thrown. If off
is negative or larger than the ByteBuffer then an ArrayIndexOutOfBoundsException
is thrown. If len is greater than the length of the ByteBuffer, then an
ArrayIndexOutOfBoundsException is thrown. This method does not change the
position of the ByteBuffer.