code: public int streamTo(TNonblockingTransport transport) throws IOException
      {
          int bytesWritten = buf.writeTo(transport, streamPos, count - streamPos);
          streamPos += bytesWritten;
          return bytesWritten;
      }
docs: Start writing accumulated content to the given transport
  or continue from the previous stop point (this method is stateful).
  
  @param transport The transport to write contents into.
  
  @return The number of bytes actually written to the transport.
  
  @throws IOException on any I/O related error, such as socket disconnect.