Append byte array to a file using FileOutputStream in Java
Description
The following code shows how to append byte array to a file using FileOutputStream.
Example
//w w w . j a va2 s . c o m
import java.io.FileOutputStream;
public class Main {
public static void main(String[] args) throws Exception {
FileOutputStream fos = new FileOutputStream("test.txt", true);
fos.write("Appended".getBytes());
fos.close();
}
}