code: public void write(byte[] buf, int off, int len) throws IOException {
      // This could of course be optimized
      for (int i = 0; i < len; i++) {
        write(buf[off + i]);
      }
    }
docs: *
  Writes the given byte array to the output stream in an encoded form.
  
  @param buf the data to be written
  @param off the start offset of the data
  @param len the length of the data
  @exception IOException if an I/O error occurs