UNB/ CS/ David Bremner/ teaching/ java/ FileStreamTest.java
import java.io.FileOutputStream;
import java.io.FileInputStream;
import java.io.IOException;
public class FileStreamTest{
    public static void main(String [] args) throws IOException{
        byte outbyte=42;
        FileOutputStream out=new FileOutputStream("example.dat");
        out.write(outbyte);
        out.close();

        FileInputStream in=new FileInputStream("example.dat");
        System.out.println(in.read());
        
    }
}

//