> after obtaining an InputStream from a Socket, do I have to close it
> seperately or does it suffice to close the Socket itself?
You should close the InputStream. It will close the Socket for you.
If you wrap the InputStream in another stream type, close that
instead. In other words, always close the *outermost* stream.
/gordon

Signature
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
Martin A - 11 Mar 2005 09:04 GMT
>
>
[quoted text clipped - 5 lines]
>
>
Is it possible to close a Socket's InputStream but not close the Socket,
and then use its OutputStream for example?
Gordon Beaton - 11 Mar 2005 11:29 GMT
> Is it possible to close a Socket's InputStream but not close the
> Socket, and then use its OutputStream for example?
Socket.shutdownInput() in that case.
/gordon

Signature
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e