/* (non-Javadoc)
@see java.io.OutputStream#write(int)
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;
    }
986147
@Override
  public void write(DataOutput out) throws IOException {
    Text.writeString(out, getJobId());
    out.writeDouble(getCpuUsageGHz());
    out.writeDouble(getMemUsageGB());
  }
65710
@Override
	public void write(byte data[], int offset, int len) throws IOException
    {
        if ((capacity - size) < len)
            flush();
        
        // Do we have enough space ?
        if (capacity >= len)
        {
            System.arraycopy(data, offset, buffer, size, len);
            size += len;
        }
        else
        {
            // Too big, write it directly ...
            out.write(data, offset, len);
        }
    }
1339289
public void write(byte b[], int off, int len)
        throws IOException
    {     
        len=prepareOutput(len);
        if (!_nulled)
            _out.write(b,off,len);
        if (_bytes==_contentLength)
            flush();
    }
846004
@Override
  public void write(DataOutput out) throws IOException {
    Text.writeString(out, getHostName());
    out.writeInt(getNumCpu());
    out.writeDouble(getCpuTotalGHz());
    out.writeDouble(getMemTotalGB());
    out.writeDouble(getCpuUsageGHz());
    out.writeDouble(getMemUsageGB());
  }
324978
public void write(OutputStream out) throws IOException
    {
        if (log.isTraceEnabled())
            log.trace("AJP13 snd: "+this.toString(64));
        // System.err.println(Thread.currentThread()+" AJP13 snd
        // "+this.toString());
        out.write(_buf,0,_bytes);
    }
1056196
@Override
  void write(ByteCodeWriter out)
    throws IOException
  {
    out.write(ConstantPool.CP_METHODHANDLE);
    out.write(_type.getCode());
    out.writeShort(_entry.getIndex());
  }
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();
        }
    }
1368019
public void write(Writer out)
         throws IOException
    {
        out.write("<!--\n");
        super.write(out);
        out.write("\n-->");
    }
371783
@Override
  public void write(int b) throws IOException {
    if (!writtenHeader) {
      writeHeader();
      writtenHeader = true;
    }
    cipherStream.write(b);
  }
90819
private void write(int c) throws IOException {
		if (!firstCharacterWritten) {
			if (c != '\n') {
				out.write(c);
				firstCharacterWritten = true;
			}
		} else {
			out.write(c);
		}
	}
331136
@Override
    public void write(int b) throws IOException {
        if (this.isClosed) {
            throw new IOException("OutputStream is closed.");
        }

        if (this.position >= this.length) {
            throw new IOException("Buffer capacity exceeded.");
        }

        this.array[this.offset + this.position] = (byte) b;
        this.position++;
    }
143697
public static void writeInt(int num, DataOutput out) throws IOException {
        if(num == 0) {
            out.write(0);
            return;
        }
        final byte bytes_needed=bytesRequiredFor(num);
        out.write(bytes_needed);
        for(int i=0; i < bytes_needed; i++)
            out.write(getByteAt(num, i));
    }
340701
@Override
  public synchronized void write(final int b) {
    BufferPool.Buffer buff = getBuffer(count, false);

    if (buff == null) {
      buff = newBuffer();
    }

    if (!buff.putByte(b)) {
      buff = newBuffer();
      if (!buff.putByte(b)) {
        throw new RuntimeException("Logic error in write(b)");
      }
    }

    count++;
  }
617665
@Override
  public void write (@Nonnull final byte [] b) throws IOException
  {
    checkThreshold (b.length);
    getStream ().write (b);
    m_nWritten += b.length;
  }
1177355
public static void write(final InputStream inputStream, final OutputStream outputStream)
		throws FileNotFoundException, IOException
	{
		int counter;
		final byte byteArray[] = new byte[FileConst.BLOCKSIZE];
		while ((counter = inputStream.read(byteArray)) != -1)
		{
			outputStream.write(byteArray, 0, counter);
		}
	}
1194715
public void write(final OutputStream out) throws IOException {
        if (this.byteOrder == ByteOrder.BIG_ENDIAN) {
            out.write(MAGIC_BIG_ENDIAN);
        } else {
            out.write(MAGIC_LITTLE_ENDIAN);
        }
        out.write(this.body);
    }