Here you can find the source of writeBytes(File file, boolean append, byte[] bytes)
Parameter | Description |
---|---|
file | a parameter |
append | a parameter |
bytes | a parameter |
Parameter | Description |
---|---|
IOException | an exception |
public static void writeBytes(File file, boolean append, byte[] bytes) throws IOException
//package com.java2s; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; public class Main { /**/* w w w . j a va 2s .c o m*/ * write bytes into file * @param file * @param append * @param bytes * @throws IOException */ public static void writeBytes(File file, boolean append, byte[] bytes) throws IOException { if (bytes.length == 0) return; FileOutputStream output = new FileOutputStream(file, append); output.write(bytes); output.flush(); output.close(); } }