From: adash Date: Sat, 1 May 2010 19:02:25 +0000 (+0000) Subject: test file for using FileOutputStream X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1919f5859c4b09c59944504109b682b3e0a55e52;p=IRC.git test file for using FileOutputStream --- diff --git a/Robust/src/Tests/FileOutputStreamTest.java b/Robust/src/Tests/FileOutputStreamTest.java new file mode 100644 index 00000000..aac17ee4 --- /dev/null +++ b/Robust/src/Tests/FileOutputStreamTest.java @@ -0,0 +1,14 @@ +//compile: ../buildscript -mainclass FileOutputStreamTest FileOutputStreamTest.java + +public class FileOutputStreamTest { + public static void main(String[] args) { + FileOutputStream fos = new FileOutputStream("/tmp/fostest.txt"); + System.out.println("###############"); + fos.FileOutputStream("/tmp/fostest.txt"); + byte[] b = new byte[1]; + b[0] = (byte) 'A'; + fos.write(b);//write one byte using FileOutputStream + fos.flush(); + fos.close(); + } +}