Writes <code>len</code> bytes from the specified byte array
starting at offset <code>off</code> to this output stream.
The general contract for <code>write(b, off, len)</code> is that
some of the bytes in the array <code>b</code> are written to the
output stream in order; element <code>boff</code> is the first
byte written and <code>b[off+len-1]</code> is the last byte written
by this operation.
<p>
The <code>write</code> method of <code>OutputStream</code> calls
the write method of one argument on each of the bytes to be
written out. Subclasses are encouraged to override this method and
provide a more efficient implementation.
<p>
If <code>b</code> is <code>null</code>, a
<code>NullPointerException</code> is thrown.
<p>
If <code>off</code> is negative, or <code>len</code> is negative, or
<code>off+len</code> is greater than the length of the array
<code>b</code>, then an <tt>IndexOutOfBoundsException</tt> is thrown.
@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. In particular,
an <code>IOException</code> is thrown if the output
stream is closed.
Writes <code>len</code> bytes from the specified byte array starting at offset <code>off</code> to this output stream. The general contract for <code>write(b, off, len)</code> is that some of the bytes in the array <code>b</code> are written to the output stream in order; element <code>boff</code> is the first byte written and <code>b[off+len-1]</code> is the last byte written by this operation. <p> The <code>write</code> method of <code>OutputStream</code> calls the write method of one argument on each of the bytes to be written out. Subclasses are encouraged to override this method and provide a more efficient implementation. <p> If <code>b</code> is <code>null</code>, a <code>NullPointerException</code> is thrown. <p> If <code>off</code> is negative, or <code>len</code> is negative, or <code>off+len</code> is greater than the length of the array <code>b</code>, then an <tt>IndexOutOfBoundsException</tt> is thrown.
@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. In particular, an <code>IOException</code> is thrown if the output stream is closed.