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
	}
public void write ( byte [ ] b , int off , int len ) throws IOException { if ( ! ( WCCustomProperties . FINISH_RESPONSE_ON_CLOSE ) || ! outputstreamClosed ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { 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 { 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 ) ; } }
Writes an array of bytes. This method will block until all the bytes
are actually written.
@param b the data to be written
@param off the start offset of the data
@param len the number of bytes to write
@exception IOException if an I/O error has occurred