We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d756749 commit e0ebdefCopy full SHA for e0ebdef
java-11/PipeStreamTest.java
@@ -0,0 +1,21 @@
1
+package com.github.wesleyegberto.api.io;
2
+
3
+import java.io.*;
4
5
+public class PipeStreamTest {
6
+ public static void main(String[] args) throws Exception {
7
+ var writer = new StringWriter();
8
+ var inputPipe = new PipedInputStream();
9
+ var inputBuffed = new BufferedInputStream(inputPipe);
10
11
+ var outputPipe = new PipedOutputStream(inputPipe);
12
+ var outputBuffered = new BufferedOutputStream(outputPipe);
13
14
+ var w = new PrintWriter(outputBuffered);
15
+ w.write("Hello Bug");
16
+ w.flush();
17
+ w.close();
18
19
+ System.out.println(new String(inputBuffed.readAllBytes()));
20
+ }
21
+}
0 commit comments