PDA

Click to See Complete Forum and Search --> : BufferedReader


Daok
Sep 28th, 2002, 11:33 AM
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

Daok
Sep 28th, 2002, 12:02 PM
I found StringReader / StringWriter but I can not see how can I send it via socket grrr

crptcblade
Sep 28th, 2002, 09:44 PM
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.

:)

Daok
Sep 29th, 2002, 03:10 PM
Thx, that what I found yesterday but forget to tell here. :)