M
mycwcgr
Unregistered / Unconfirmed
GUEST, unregistred user!
为什么socket.getInputStream().available() 会为0
请问socket.getInputStream()肯定有内容,但get_from_server.available()和socket.getInputStream().available()为什么均为0 ?
BufferedInputStream get_from_server = new BufferedInputStream(socket.getInputStream());
System.out.println(get_from_server.available() );
System.out.println(socket.getInputStream().available() );
是不是available()仅仅在FileInputStream中才能正确返回字节大小?
请问socket.getInputStream()肯定有内容,但get_from_server.available()和socket.getInputStream().available()为什么均为0 ?
BufferedInputStream get_from_server = new BufferedInputStream(socket.getInputStream());
System.out.println(get_from_server.available() );
System.out.println(socket.getInputStream().available() );
是不是available()仅仅在FileInputStream中才能正确返回字节大小?