public synchronized void write(byte b[], int off, int len)
  throws IOException {
    if (off < 0 || len < 0 || off > b.length - len) {
      throw new ArrayIndexOutOfBoundsException();
    }

    for (int n=0;n<len;n+=write1(b, off+n, len-n)) {
    }
    incMetrics(len);
  }
public synchronized void write ( byte b [ ] , int off , int len ) throws IOException { if ( off < 0 || len < 0 || off > b . length - len ) { throw new ArrayIndexOutOfBoundsException ( ) ; } for ( int n = 0 ; n < len ; n += write1 ( b , off + n , len - n ) ) { } incMetrics ( len ) ; }
Writes <code>len</code> bytes from the specified byte array
starting at offset <code>off</code> and generate a checksum for
each data chunk.

<p> This method stores bytes from the given array into this
stream's buffer before it gets checksumed. The buffer gets checksumed
and flushed to the underlying output stream when all data
in a checksum chunk are in the buffer.  If the buffer is empty and
requested length is at least as large as the size of next checksum chunk
size, this method will checksum and write the chunk directly
to the underlying output stream.  Thus it avoids uneccessary data copy.

@param      b     the data.
@param      off   the start offset in the data.
@param      len   the number of bytes to write.
@exception  IOException  if an I/O error occurs.