java - Does closing the socket close the stream? -
i working in legacy java application, in many files, socket , streams used, sockets getting closed not streams, necessary close streams before closing socket. because getting "too many open files error", error because of not closing streams.....
closing socket automatically close streams also?
from socket javadoc:
closing socket close socket's
inputstream,outputstream.
so speaking, closing socket should enough close both streams created.
your "too many open files error" caused else.
Comments
Post a Comment