Java tutorial
//package com.java2s; import java.io.FileOutputStream; public class Main { public static boolean writeBytes(String filePath, byte[] data) { try { FileOutputStream fos = new FileOutputStream(filePath); fos.write(data); fos.close(); return true; } catch (Exception e) { System.out.println(e.getMessage()); } return false; } }