Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > "PipedWriter writer = new PipedWriter(System.in);" possible ????

Reply
Thread Tools

"PipedWriter writer = new PipedWriter(System.in);" possible ????

 
 
Peter Blatt
Guest
Posts: n/a
 
      08-27-2003
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you change a dvd combo (cd writer/ dvd reader) into a dvd writer using just software?? talk2_jd@yahoo.com DVD Video 3 03-31-2006 05:12 PM
Problems with Cdrom and DVD writer and CD writer Combo reachinout Computer Support 1 09-20-2004 10:02 PM
Isn't DataGrid.Render(writer) supposed to automatically call RenderBeginTag(writer) and RenderEndTag(writer)? Henri ASP .Net Building Controls 1 07-13-2004 10:27 PM
CD writer and Dvd writer problem Gareth not NLL or anybody else. Computer Support 3 04-28-2004 12:41 PM
Replacing CD writer with DVD writer zebu Computer Support 5 04-12-2004 03:04 AM



Advertisments