Socket soc = new Socket("host",1111);
BufferedOutputStream bos = new BufferedOutputStream(soc.getOutputStream);
DataOutputStream dos = new DataOutputStream(bos);
상황은 특정 서버와 소켓통신을 하는 상태이고..
soc는 소켓입니다.
궁금한건 두가지입니다.
1.
위와 같은 상황일때
dos.close(); 를 하면 저기 소켓도 close가 되는건가요?
아니면 스트림만 close가 되는건가요?
긴가민가 하네요..
2.
dos.close();를 하면 bos는 close를 하지 않아도 자동으로 close가 되는건가요?
조언부탁드립니다.^^