code: public static void writeFile(byte[] content,File file) throws IOException
      {
          OutputStream outputStream=null;
          try
          {
              //create output stream to file
              outputStream=new FileOutputStream(file);
              
              //write to file
              outputStream.write(content);
          }
          finally
          {
              //close writer
              IOHelper.closeResource(outputStream);
          }
      }
docs: Writes the content to the file.
  
  @param   content
  The content to write to the provided file
  @param   file
  The target file
  @throws  IOException
  Any IO exception