We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba1c80f commit 7cb2f9cCopy full SHA for 7cb2f9c
Practicals/Buff.java
@@ -0,0 +1,18 @@
1
+import java.io.*;
2
+public class Buff{
3
+public static void main(String args[])throws Exception{
4
+ BufferedOutputStream w=new BufferedOutputStream(new FileOutputStream("D:\\java learning\\practical\\testout.txt"));
5
+ String s="Hello World";
6
+ byte b[]=s.getBytes();
7
+ w.write(b);
8
+ System.out.println("After writing into file: ");
9
+ BufferedInputStream r=new BufferedInputStream(new FileInputStream("D:\\java learning\\practical\\testout.txt"));
10
+ int i;
11
+ while((i=r.read())!=-1)
12
+ {
13
+ System.out.println(i);
14
+ }
15
+ w.close();
16
+ r.close();
17
+}
18
0 commit comments