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

Discussion in 'Java' started by Peter Blatt, Aug 27, 2003.

  1. Peter Blatt

    Peter Blatt Guest

    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
    Peter Blatt, Aug 27, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Giagnocavo [MVP]

    Re: Is it possible....

    Michael Giagnocavo [MVP], Jun 28, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,208
    Michael Giagnocavo [MVP]
    Jun 28, 2003
  2. Ekkehard Kraemer

    Development on 98 possible at all?

    Ekkehard Kraemer, Sep 13, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    428
    Dino Chiesa [Microsoft]
    Sep 22, 2003
  3. Markus
    Replies:
    1
    Views:
    469
    Markus
    Nov 22, 2005
  4. Replies:
    4
    Views:
    287
    Kenny McCormack
    Feb 21, 2006
  5. Replies:
    10
    Views:
    484
    Chris Gonnerman
    Dec 14, 2007
Loading...

Share This Page