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