code: public static void debugTraceWsByteBuffer(Object _this, TraceComponent _tc, WsByteBuffer buffer, int amount, String comment)
     {
        byte[] data = null;
        int start;
        int count = amount;
        if (count > buffer.remaining()) count = buffer.remaining();
  
        if (buffer.hasArray())
        {
           data = buffer.array();
           start = buffer.arrayOffset() + buffer.position();;
        }
        else
        {
           data = new byte[count];
           int pos = buffer.position();
           buffer.get(data);
           buffer.position(pos);
           start = 0;
        }
  
        StringBuffer sb = new StringBuffer(comment);
        sb.append("\nbuffer hashcode:  ");
        sb.append(buffer.hashCode());
        sb.append("\nbuffer position:  ");
        sb.append(buffer.position());
        sb.append("\nbuffer remaining: ");
        sb.append(buffer.remaining());
        sb.append("\n");
        SibTr.debug(_this, _tc, sb.toString());
        if (count > 0)
           SibTr.bytes(_this, _tc, data, start, count, "First "+count+" bytes of buffer data:");
     }
docs: Produces a debug trace entry for a WsByteBuffer.  This should be used
  as follows:
  <code>
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) debugTraceWsByteBuffer(...);
  </code>
  @param _this   Reference to the object invoking this method.
  @param _tc     Reference to TraceComponent to use for outputing trace entry.
  @param buffer  Buffer to trace.
  @param amount  Maximum amount of data from the buffer to trace.
  @param comment A comment to associate with the trace entry.