code: public static void setBytes(OutputStream os, byte[] bytes) throws IOException {
          try {
              os.write(bytes);
          } finally {
              closeWithWarning(os);
          }
      }
docs: Write the byte[] to the output stream.
  The stream is closed before this method returns.
  
  @param os    an output stream
  @param bytes the byte[] to write to the output stream
  @throws IOException if an IOException occurs.
  @since 1.7.1