public void write(byte[] buf,int off,int len) throws TTransportException {
  if (outputStream_ == null) {
    throw new TTransportException(TTransportException.NOT_OPEN,"Cannot write to null outputStream");
  }
  try {
    outputStream_.write(buf,off,len);
  }
 catch (  IOException iox) {
    throw new TTransportException(TTransportException.UNKNOWN,iox);
  }
}

public void write ( byte [ ] buf , int off , int len ) throws TTransportException { if ( outputStream_ == null ) { throw new TTransportException ( TTransportException . NOT_OPEN , "Cannot write to null outputStream" ) ; } try { outputStream_ . write ( buf , off , len ) ; } catch ( IOException iox ) { throw new TTransportException ( TTransportException . UNKNOWN , iox ) ; } }
writes to the underlying output stream if not null .
