code: @Override
    public void write(int b) throws IOException
    {
      if(!bytesBuffer.hasRemaining()) {
        processBytesBuffer(false);
      }
      bytesBuffer.put((byte)b);
    }
docs: Write a single byte to the stream. If bytes buffer is full invokes {@link #processBytesBuffer(boolean)} first.
  
  @param b the byte to write.
  @throws IOException if writing operation to underlying target writer fails.