code: public static String toDetailString(ByteBuffer buffer) {
          if (buffer == null)
              return "null";
  
          StringBuilder buf = new StringBuilder();
          idString(buffer, buf);
          buf.append("[p=");
          buf.append(buffer.position());
          buf.append(",l=");
          buf.append(buffer.limit());
          buf.append(",c=");
          buf.append(buffer.capacity());
          buf.append(",r=");
          buf.append(buffer.remaining());
          buf.append("]={");
  
          appendDebugString(buf, buffer);
  
          buf.append("}");
  
          return buf.toString();
      }
docs: Convert Buffer to a detail debug string of pointers and content
  
  @param buffer the buffer to generate a detail string from
  @return A string showing the pointers and content of the buffer