Here you can find the source of writeFile(String fileName, byte[] data)
public static void writeFile(String fileName, byte[] data) throws FileNotFoundException, IOException
//package com.java2s; /**/*from w w w . ja v a 2s .c o m*/ * Copyright 2010 ZTEsoft Inc. All Rights Reserved. * * This software is the proprietary information of ZTEsoft Inc. * Use is subject to license terms. * * $Tracker List * * $TaskId: $ $Date: 9:24:36 AM (May 9, 2008) $comments: create * $TaskId: $ $Date: 3:56:36 PM (SEP 13, 2010) $comments: upgrade jvm to jvm1.5 * * */ import java.io.*; public class Main { public static void writeFile(String fileName, byte[] data) throws FileNotFoundException, IOException { File file = new File(fileName); FileOutputStream fs = new FileOutputStream(file); fs.write(data); fs.close(); } }