code: public void write(byte[] b, int off, int len) throws IOException
      {
          if(_outHelper.isOutputStream_closed()|| _outHelper.isOutputStream_close_initiated_but_not_Flush_ready()){
              Tr.error(tc, "stream.is.closed.no.read.write");                         
              throw new IOException(Tr.formatMessage(tc, "stream.is.closed.no.read.write"));           
          }
          if(b == null){
              Tr.error(tc, "read.write.bytearray.null"); 
              throw new NullPointerException(Tr.formatMessage(tc, "read.write.bytearray.null"));
          }
          if (off <0 || len < 0 || off+len > b.length)
          {            
              Tr.error(tc, "read.write.offset.length.bytearraylength", new Object[] { off,  len, b.length} );
              throw new IndexOutOfBoundsException(Tr.formatMessage(tc, "read.write.offset.length.bytearraylength", new Object[] { off,  len, b.length}));            
          }
          if(this._listener!= null &&  !checkIfCalledFromWLonError()){
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())    
                  Tr.debug(tc, "write : non blocking write requested, WriteListener enabled: " + this._listener);
              synchronized(this){                 
                _outHelper.write_NonBlocking(b, off, len);                
              }
          }           
          else {
              _outHelper.writeWork(b, off, len);
              
          }
  
      }
docs: /* (non-Javadoc)
  @see java.io.OutputStream#write(byte[], int, int)