Sunday, February 16, 2014

Java Buffer

Buffer.java

import java.io.*;
class Buffer1
{
public static void main(String surat[])throws IOException
{
FileOutputStream fout=new FileOutputStream("mahi1.txt");
BufferedOutputStream bout=new BufferedOutputStream(fout);

String s="Good Morning";
byte b[]=s.getBytes();
bout.write(b);

bout.flush();
bout.close();

System.out.println("Success");
}
}

Output:


No comments:

Post a Comment