Writes a byte array to the stream.
@param b The array to write.
@param off The offset of the array to start copying data from.
@param len The number of bytes to write.
425999
public void
writeByteArray(byte [] b, int off, int len) {
	need(len);
	System.arraycopy(b, off, array, pos, len);
	pos += len;
}
520041
public void postwrite(byte[] b,int offset, int length)
        throws IOException
    {
        System.arraycopy(b,offset,_buf,_pos,length);
        _pos+=length;
    }
483939
public void write(final byte[] src, int off, int len)
	{
		if(src == null) throw new NullPointerException();
		if((off < 0) || (off > src.length) || (len < 0) || ((off + len) > src.length) || ((off + len) < 0)) throw new IndexOutOfBoundsException();

		writeLoop(src, off, len);		
	}
567445
public void writeLE(final long n, final int b) {
        long v = n;
        for (int i = 0; i < b; i++) {
            write((byte) (v & 0xff));
            v >>= 8;
        }
    }
340550
public void write(byte []buf, int offset, int length, boolean isEnd)
    throws IOException
  {
    if (_stream != null)
      _stream.write(buf, offset, length, isEnd);
  }
766054
protected void writeDirectBytes(byte[] b, int off, int len)
			throws IOException {
		ostream.write(b, off, len);
		len += len;
	}
1243990
@Override
  public void write(byte[] b, int off, int len) throws IOException {
    textArea.append(new String(b, off, len));
  }
1120740
@Override
    public void write(int b) throws IOException {
        int newcount = count + 1;
        if (newcount > buf.length) {
            buf = Arrays.copyOf(buf, oversize(newcount));
        }
        buf[count] = (byte) b;
        count = newcount;
    }
576374
public void write(byte[] b, int offset, int length)
        throws IOException
    {
        int o=offset;
        int l=length;
        while (l>0)
        {
            int c=capacity();
            
            if (_bypassBuffer && isCommitted() && size()==0 && l>c)
            {
                // Bypass buffer
                bypassWrite(b,o,l);
                break;
            }

            if (l<c || !isFixed())
            {
                // Write all
                super.write(b,o,l);
                break;
            }
            else
            {
                // Write a block
                super.write(b,o,c);
                flush();
                l-=c;
                o+=c;
            }
        }
    }
562598
public int read(byte b[], int off, int len) throws IOException {
	if (off + len > b.length) {
	    len = b.length - off;
	}
	if (len < 0) {
	    return -1;
	}
	if (len == 0) {
	    return 0;
	}
	int n = blob.read(b, off, pos, len);
	if (n > 0) {
	    pos += n;
	    return n;
	}
	return -1;
    }
842085
public void write(byte[] b, int off, int len) throws IOException
	{
		//PK89810, If WCCustomProperties.FINISH_RESPONSE_ON_CLOSE is set and stream is already obtained and closed. 
		// User will not be allowed to write more data if the above case is met, outputstreamClosed will be true and default is false.
		if (!(WCCustomProperties.FINISH_RESPONSE_ON_CLOSE) || !outputstreamClosed ) //PK89810
		{
		if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
			logger.logp(Level.FINE, CLASS_NAME,"write", "write len --> "+len);
        }
		if (len < 0)
		{
			logger.logp(Level.SEVERE, CLASS_NAME,"write", "Illegal.Argument.Trying.to.write.chars");
			throw new IllegalArgumentException();
		}
		if (!_hasWritten && obs != null)
		{
			_hasWritten = true;
			if (obsList!=null){
				for (int i=0;i<obsList.size();i++){
					obsList.get(i).alertFirstWrite();
				}
			}
			else {
			obs.alertFirstWrite();
		}
		}
		if (limit > -1)
		{
			if (total + len > limit)
			{
				len = limit - total;
				except = new WriteBeyondContentLengthException();
			}
		}
		if (len >= buf.length)
		{
			response.setFlushMode(false);
			flushBytes();
			total += len;
			writeOut(b, off, len);
			response.setFlushMode(true);
			check();
			return;
		}
		int avail = buf.length - count;
		if (len > avail)
		{
			response.setFlushMode(false);
			flushBytes();
			response.setFlushMode(true);
		}
		System.arraycopy(b, off, buf, count, len);
		count += len;
		total += len;
		check();
	}
		else
		{//PK89810 start
			if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))
				logger.logp(Level.FINE, CLASS_NAME,"write", "write bytes not allowed, outputstreamClosed value --> " + outputstreamClosed);			
		}//PK89810 End
	}
706001
@Override
    public void write(byte[] b, int off, int len) throws IOException {
        if (currentEntry != null && !currentEntry.isDirectory()) {
            if (currentEntry.getSize() < currentFileSize + len) {
                throw new IOException( "The current entry[" + currentEntry.getName() + "] size["
                        + currentEntry.getSize() + "] is smaller than the bytes[" + ( currentFileSize + len )
                        + "] being written." );
            }
        }

        out.write( b, off, len );
        
        bytesWritten += len;

        if (currentEntry != null) {
            currentFileSize += len;
        }        
    }
770342
public void write(char cbuf[], int off, int len) {
        if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) {
            throw new IndexOutOfBoundsException();
        } else if (len == 0) {
            return;
        }
        buf.append(cbuf, off, len);
    }
28498
@Override
  public void write(byte[] b, int off, int len) throws IOException {
    for (OutputStream child : children) {
      child.write(b, off, len);
    }
  }
782503
@Override
  public void write(byte []buffer, int offset, int length)
  {
    write(buffer, offset, length, true);
  }
380968
@Override
	public void write(byte[] b, int off, int len) throws PacketException {
		baq.add(b, off, len);
		while (packetSize > 0 || (packetSize = parser.getSize(baq.array(),
				baq.offset(), baq.length())) > 0) {
			if (baq.length() < packetSize) {
				return;
			}
			consumer.accept(baq.array(), baq.offset(), packetSize);
			baq.remove(packetSize);
			packetSize = 0;
		}
	}
106927
public void writeBytes(byte value, int len) throws IOException {
    if (len > buf.length - pos) {
      //not enough space remaining
      byte[] arr = new byte[len];
      Arrays.fill(arr, value);
      write(arr, 0, len);
      return;
    }

    for (int i = pos; i < pos + len; i++) {
      buf[i] = value;
    }
    pos += len;
  }