FileOutputStream fos = new FileOutputStream(fileName);
InputStream is = clientSocket.getInputStream();
while ((readBytes = is.read()) != -1)
{
fos.write(readBytes);
System.err.println(readBytes);
}
System.err.println(readBytes);
clientSocket.shutdownOutput();
fos.close();
System.out.println("Trans complete");
客户端发送-1,但服务器无法接收-1
我怎样才能得到所有文件?