import java.io.BufferedOutputStream;
import java.io.DataOutputStream;
import java.io.FileOutputStream;
public class MainClass {
public static void main(String[] argv)throws Exception {
FileOutputStream fos = new FileOutputStream("moredata.bin");
BufferedOutputStream bos = new BufferedOutputStream(fos, 4096);
DataOutputStream dos = new DataOutputStream(bos);
// assume lots of data writing goes on here
dos.flush();
dos.close();
}
}
|