Results 1 to 4 of 4

Thread: BufferedReader

  1. #1

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362

    BufferedReader

    How can I send a String by a BufferReader


    I want to replace that code :
    BufferedReader stdIn = new BufferedReader(
    new InputStreamReader(System.in));

    By BufferedReader stdIn = new BufferedReader(STRING HERE);

    How can I do that

  2. #2

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    I found StringReader / StringWriter but I can not see how can I send it via socket grrr

  3. #3
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    So your real question is how to send/receive data via sockets?

    If so, the Socket class has the getOutputStream() and getInputStream() methods that you can wrap into the BufferedReader and the comparable Writer classes.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  4. #4

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    Thx, that what I found yesterday but forget to tell here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width