docs: private WsByteBuffer readData(WsByteBuffer unparsedData,
                                    WsByteBuffer scratchArea)
     {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "readData", new Object[] {unparsedData, scratchArea});
        int scratchAreaRemaining = scratchArea.remaining();
        int scratchAreaUsed = scratchArea.position();
        WsByteBuffer retBuffer = null;
  
        if ((scratchAreaUsed == 0) &&
            (unparsedData.remaining() >= scratchAreaRemaining))
        {
           retBuffer = unparsedData;
        }
        else
        {
           int amountCopied = JFapUtils.copyWsByteBuffer(unparsedData,
                                                         scratchArea,
                                                         scratchAreaRemaining);
           if (amountCopied >= scratchAreaRemaining)
           {
              retBuffer = scratchArea;
              retBuffer.flip();
           }
        }
  
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "readData", retBuffer);
        return retBuffer;
     }