[ code]DataInputStream dis1 = new DataInputStream(socket.getInputStream());
File file = new File(dis1.readUTF());
System.out.println(dis1.readUTF());
dis1.close();
DataInputStream dis2 = new DataInputStream(socket.getInputStream());
File file = new File(dis2.readUTF());
System.out.println(dis2.readUTF());
dis2.close();
[/code]
看代码,第一次的dis1关闭之后,构造方法了里的socket也关闭了,等下次你再拿socket.getInputStream时。socket是关闭的。 |