code: public final int write (final SocketChannel sChannel) throws InternetSCSIException , IOException {
  
          // print debug informations
          if (LOGGER.isTraceEnabled()) {
              LOGGER.trace(basicHeaderSegment.getParser().getShortInfo());
          }
  
          final ByteBuffer src = serialize();
          int length = 0;
  
          while (length < src.limit()) {
              length += sChannel.write(src);
          }
  
          return length;
      }
docs: Writes this <code>ProtocolDataUnit</code> object to the given <code>SocketChannel</code>.
  
  @param sChannel <code>SocketChannel</code> to write to.
  @return The number of bytes written, possibly zero.
  @throws InternetSCSIException if any violation of the iSCSI-Standard emerge.
  @throws IOException if an I/O error occurs.