BufferedWriter bw=new BufferedWriter (new OutputStreamWriter(s.getOutputStream()));
bw.write("上传成功");
bw.flush();
in.close();
fo.close();
s.close();
}
catch (Exception e)
{
throw new RuntimeException("上传失败");
}
}
}
class Server
{
public static void main(String[] args)throws Exception
{
ServerSocket ss=new ServerSocket(10008);
while (true)
{
Socket s=ss.accept();
new Thread(new SumRun(s)).start();
}