Writes the data to the System.out.

@param buf the buffer to write.
@param offset starting offset in the buffer.
@param length number of bytes to write.
@param isEnd true when the stream is closing.
499021
public void write(byte []buf, int offset, int length, boolean isEnd)
    throws IOException
  {
    System.out.write(buf, offset, length);
    System.out.flush();
  }
426859
@Override
    public void write(int b)
            throws IOException
    {
        if (closed) {
            throw new IOException("Stream is closed");
        }
        if (inputCursor >= inputBuffer.length) {
            compressInput();
        }
        inputBuffer[inputCursor++] = (byte) b;
    }
441030
@Override
  public void write(byte []buffer, int offset, int length)
    throws IOException
  {
    _stream.write(buffer, offset, length, false);
  }
472805
public void write(byte []buf, int offset, int length, boolean isEnd)
    throws IOException
  {
    OutputStream os = _os;
    
    if (os != null) {
      os.write(buf, offset, length);
    }
  }
155110
public void writeText(char[] buf, int offset, int length)
  {
    closeElementIfNeeded(false);
    writeIndentIfNewLine();
    _strategy.writeText(this, buf, offset, length);
  }
390580
final public void write(char []buf, int offset, int length)
  {
    Writer out = this.out;
    if (out == null)
      return;

    try {
      out.write(buf, offset, length);
    } catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
    }
  }
631291
public void write(String s, int offset, int length)
    throws IOException
  {
    while (length > 0) {
      if (_tail == null)
        addBuffer(TempCharBuffer.allocate());
      else if (_tail._buf.length <= _tail._length) {
        addBuffer(TempCharBuffer.allocate());

        // XXX: see TempStream for backing files
      }

      int sublen = _tail._buf.length - _tail._length;
      if (length < sublen)
        sublen = length;

      s.getChars(offset, offset + sublen, _tail._buf, _tail._length);

      offset += sublen;
      length -= sublen;
      _tail._length += sublen;
    }
  }
378047
@Override
    public void write(int b) throws IOException {
        byte[] bytes = new byte[1];
        bytes[0] = (byte) (b & 0xff);
        buffer = buffer + new String(bytes);

        if (buffer.endsWith("\n")) {
            buffer = buffer.substring(0, buffer.length() - 1);
            flush();
        }
    }
780703
public void write(byte []buf, int offset, int length, boolean isEnd)
    throws IOException
  {
    int end = offset + length;
    while (offset < end) {
      int ch1 = buf[offset++] & 0xff;

      if (ch1 < 0x80)
        os.write(ch1);
      else if ((ch1 & 0xe0) == 0xc0) {
        if (offset >= end)
          throw new EOFException("unexpected end of file in utf8 character");
        
        int ch2 = buf[offset++] & 0xff;
        if ((ch2 & 0xc0) != 0x80)
          throw new CharConversionException("illegal utf8 encoding");
      
        os.write(((ch1 & 0x1f) << 6) + (ch2 & 0x3f));
      }
      else if ((ch1 & 0xf0) == 0xe0) {
        if (offset + 1 >= end)
          throw new EOFException("unexpected end of file in utf8 character");
        
        int ch2 = buf[offset++] & 0xff;
        int ch3 = buf[offset++] & 0xff;
      
        if ((ch2 & 0xc0) != 0x80)
          throw new CharConversionException("illegal utf8 encoding");
      
        if ((ch3 & 0xc0) != 0x80)
          throw new CharConversionException("illegal utf8 encoding");
      
        os.write(((ch1 & 0x1f) << 12) + ((ch2 & 0x3f) << 6) + (ch3 & 0x3f));
      }
      else
        throw new CharConversionException("illegal utf8 encoding at (" +
                                          (int) ch1 + ")");
    }
  }
757253
public void write(byte[] buf, int offset, int len) throws IOException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
    { // 306998.15
      Tr.debug(tc, "write len --> " + len + ", limit->" + limit);
    }
    if (len < 0)
    {
      if (tc.isErrorEnabled())
        Tr.error(tc, "Illegal.Argument.Trying.to.write.chars");
      throw new IllegalArgumentException();
    }
    if (!_hasWritten && obs != null)
    {
      _hasWritten = true;
      obs.alertFirstWrite();
    }

    if (limit > -1)
    {
      if (total + len > limit)
      {
        len = limit - total;
        except = new WriteBeyondContentLengthException();
      }
    }

    int toWrite = 0, amountWritten = 0, remaining = 0;

    while (amountWritten != len)
    {

      checkList();

      toWrite = len - amountWritten;
      remaining = current.remaining();

      if (toWrite <= remaining)
      {

        /*
         * We can write it all in the current buffer
         */
        current.put(buf, offset + amountWritten, toWrite);
        amountWritten += toWrite;
      }
      else
      {

        /*
         * Write what we can to the current position
         */
        current.put(buf, offset + amountWritten, remaining);
        amountWritten += remaining;
      }
    }
    count += len;
    total += len;
    check();
  }
244022
public void write(byte[] b,int offset, int length)
        throws IOException
    {
        ensureSpareCapacity(length);
        System.arraycopy(b,offset,_buf,_pos,length);
        _pos+=length;
    }
617494
public void write(io.netty.buffer.ByteBuf buf, int off, int len) throws IOException {
    if (len == 0) {
      return;
    }

    while (len > 0) {
      updateCurrentChunk(false);
      int toWrite = Math.min(len, mCurrentChunk.writableBytes());
      mCurrentChunk.writeBytes(buf, off, toWrite);
      off += toWrite;
      len -= toWrite;
    }
    updateCurrentChunk(false);
  }
410337
public static void writeBuffer(DataOutput out, ByteBuffer buffer) throws IOException {
        if (buffer.hasArray()) {
            out.write(buffer.array(), buffer.arrayOffset() + buffer.position(), buffer.remaining());
            buffer.position(buffer.limit());
        } else {
            final byte[] array = new byte[buffer.remaining()];
            buffer.get(array);
            assert buffer.remaining() == 0 && buffer.position() == buffer.limit();
            out.write(array);
        }
    }
451106
@Override
  public void write(byte []buffer, int offset, int length)
    throws IOException
  {
    while (length > 0) {
      if (_bufferEnd <= _offset) {
        flushBlock(false);
      }

      int sublen = Math.min(_bufferEnd - _offset, length);

      System.arraycopy(buffer, offset, _buffer, _offset, sublen);

      offset += sublen;
      _offset += sublen;

      length -= sublen;
    }
  }
1344517
public void write(final int b)
    {
        if (position == length)
        {
            throw new IllegalStateException("position has reached the end of underlying buffer");
        }

        buffer.putByte(offset + position, (byte)b);
        ++position;
    }
685502
@Override
    public void write(char cbuf[], int off, int len) {
        buf.append(cbuf, off, len);
    }
1033300
public int write(byte []buffer, int offset, int length, boolean isEnd)
    throws IOException
  {
    int result;

    long requestExpireTime = _requestExpireTime;

    if (requestExpireTime > 0 && requestExpireTime < CurrentTime.currentTime()) {
      close();
      throw new ClientDisconnectException(L.l("{0}: request-timeout write exp={0}s",
                                              addressRemote(),
                                              CurrentTime.currentTime() - requestExpireTime));
    }

    synchronized (_writeLock) {
      long now = CurrentTime.getCurrentTimeActual();
      long expires = _socketTimeout + now;

      // _isNativeFlushRequired = true;

      do {
        result = writeNative(_socketFd, buffer, offset, length);

        //byte []tempBuffer = _byteBuffer.array();
        //System.out.println("TEMP: " + tempBuffer);
        //System.arraycopy(buffer, offset, tempBuffer, 0, length);
        //_byteBuffer.position(0);
        //_byteBuffer.put(buffer, offset, length);
        //result = writeNativeNio(_fd, _byteBuffer, 0, length);
      } while (result == JniStream.TIMEOUT_EXN
               && CurrentTime.getCurrentTimeActual() < expires);
    }

    if (isEnd) {
      // websocket/1261
      closeWrite();
    }
    
    return result;
  }