code: public byte[] getBuffer() {
          buffer.flip();
          byte[] tmp = new byte[buffer.remaining()];
          buffer.get(tmp);
          buffer.clear();
          return tmp;
      }
docs: Returns buffered byte array.
  
  @return bytes