public void write (byte[] b) throws IOException

Writes b.length bytes from the specified byte array to this output stream. The general contract for write(b) is that it should have exactly the same effect as the call write(b, 0, b.length).

Parameters:
b    the data.

Exceptions:
IOException    if an I/O error occurs.

See also:
java.io.OutputStream.write(byte[], int, int)