
Signature
monique
Help us help you:
http://www.catb.org/~esr/faqs/smart-questions.html
br is a character stream, while oi (ObjectInputStream) is of course a
bytestream, so i don't think oi = new ObjectInputStream(br); will work
i have to send and receive tekst en objects through a socket. i can
also recieve my Strings with an objectinputstream but i want to use a
bufferedreader because i need some functions of it that
objectinputstream doesn't have. So i just want to be able to set an
objectinputstream on the inputstream of the socket while there is also
constantly an bufferedreader on the inputstream. Is there a way to do
so?
Rhino - 29 Apr 2006 15:55 GMT
> br is a character stream, while oi (ObjectInputStream) is of course a
> bytestream, so i don't think oi = new ObjectInputStream(br); will work
> i have to send and receive tekst en objects
"tekst en" objects??
What's that in English?
Even if I assume that this is just sloppy typing with transposed characters,
I can't think of any English word that resembles this that would make sense
in this context.....
> through a socket. i can
> also recieve my Strings with an objectinputstream but i want to use a
[quoted text clipped - 3 lines]
> constantly an bufferedreader on the inputstream. Is there a way to do
> so?
--
Rhino
Chris Uppal - 29 Apr 2006 16:33 GMT
> "tekst en" objects??
>
> What's that in English?
Text and objects.
-- chris
EJP - 30 Apr 2006 08:51 GMT
> br is a character stream, while oi (ObjectInputStream) is of course a
> bytestream, so i don't think oi = new ObjectInputStream(br); will work
[quoted text clipped - 5 lines]
> constantly an bufferedreader on the inputstream. Is there a way to do
> so?
Both ObjectInputStream and BufferedReader do buffering internally, so
they are *bound* to interfere with each other no matter which way you
stack them up. You might think that new BufferedReader(new
InputStreamReader(new ObjectInputStream(socket.getInputStream()))) might
be plausible but it isn't. You need to rethink your requirement.