Code:
/*
Program to demonstrate BufferedOutputStream
*/
import java.io.*;
class BufferedODemo
{
public static void main(String args[]) throws IOException
{
FileOutputStream fos = new FileOutputStream("t1.txt");
BufferedOutputStream bos = new BufferedOutputStream(fos);
bos.write("Coding Atharva".getBytes());
bos.flush();
System.out.println("Data Written Into a File");
}
}
Program to demonstrate BufferedOutputStream
*/
import java.io.*;
class BufferedODemo
{
public static void main(String args[]) throws IOException
{
FileOutputStream fos = new FileOutputStream("t1.txt");
BufferedOutputStream bos = new BufferedOutputStream(fos);
bos.write("Coding Atharva".getBytes());
bos.flush();
System.out.println("Data Written Into a File");
}
}