public static void writeBinaryFile(final File file, final byte[] data) throws IOException {
    final FileOutputStream fos = new FileOutputStream(file);

    try {
      fos.write(data);
    } finally {
      fos.close();
    }
  }
Writes a byte array to a binary file.

@param file The file to write to.
@param data The data to write.
@throws IOException
java/zylib/src/main/java/com/google/security/zynamics/zylib/io/FileUtils.java