code: public static String toDebugString(String name, ByteBuffer byteBuffer) {
          return name + "(pos:" + byteBuffer.position() + " lim:" + byteBuffer.limit()
                  + " remain:" + byteBuffer.remaining() + " cap:" + byteBuffer.capacity() + ")";
      }
docs: Creates a debug String for te given ByteBuffer. Useful when debugging IO.
  <p>
  Do not remove even if this method isn't used.
  
  @param name       name of the ByteBuffer.
  @param byteBuffer the ByteBuffer
  @return the debug String