P
Peter Blatt
I want to write something to System.in which in turn should be piped forward
to a buffered readLine() in another thread. In other words
BufferedWriter bw = new BufferedWriter(System.in);
bw.write("hello");
....
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
String buf.readLine();
the variable "buf" should contain afterwards the String "hello";
Is such a construction possible ?
Do I have to declare
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.in));
instead of the simple version above?
Regards
Peter
to a buffered readLine() in another thread. In other words
BufferedWriter bw = new BufferedWriter(System.in);
bw.write("hello");
....
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
String buf.readLine();
the variable "buf" should contain afterwards the String "hello";
Is such a construction possible ?
Do I have to declare
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.in));
instead of the simple version above?
Regards
Peter