code: public void write(byte []buf, int offset, int length, boolean isEnd)
      throws IOException
    {
      if (_s == null)
        return;
      
      try {
        _os.write(buf, offset, length);
        _totalWriteBytes += length;
      } catch (IOException e) {
        try {
          close();
        } catch (IOException e1) {
        }
  
        throw ClientDisconnectException.create(e);
      }
    }
docs: Writes bytes to the socket.
  
  @param buf byte buffer containing the bytes
  @param offset offset into the buffer
  @param length number of bytes to read
  @param isEnd if the write is at a close.
  
  @exception throws ClientDisconnectException if the connection is dropped