 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Peter Blatt Guest
|
Posted: Wed Aug 27, 2003 5:09 pm Post subject: "PipedWriter writer = new PipedWriter(System.in);" possibl |
|
|
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
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|