code: public synchronized long prepareForTransmission()
     {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "prepareForTransmission");
  
        checkValid();
        valid = false;
  
        // Get the last buffer and flip it. Then we can simply return the list of buffers
        if (dataList.size() > 0)
        {
           WsByteBuffer buff = dataList.get(dataList.size() - 1);
           buff.flip();
        }
  
        long sendAmount = 0;
        for (int x = 0; x < dataList.size(); x++)
        {
           WsByteBuffer buff = dataList.get(x);
           sendAmount += buff.remaining();
        }
  
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "prepareForTransmission", Long.valueOf(sendAmount));
        return sendAmount;
     }
docs: This method prepares the byte buffers wrapped by this class for transmission. In practise
  this means that all the buffers are flipped and the number of bytes that will be transmitted
  is returned.
  
  @return Returns the amount of data that is ready to be sent.