网络编程文件上传(客户端上传文件到服务器端)Client.java客户端public class Client { public static void main(String[] args) throws IOException { //客户端 Socket client = new Socket("localhost", 9999); InputStream is = new BufferedInputStream(new FileInp
摘要由CSDN通过智能技术生成
文件上传(客户端上传文件到服务器端)
Client.java客户端
publicclassClient{
publicstaticvoidmain(String[] args)throws IOException {
//客户端
Socket client =newSocket("localhost",9999);
InputStream is =newBufferedInputStream(newFileInputStream("a.txt"));byte[] car =newbyte[10];int len =-1;//输出流
DataOut
网络编程文件上传(客户端上传文件到服务器端)Client.java客户端public class Client { public static void main(String[] args) throws IOException { //客户端 Socket client = new Socket("localhost", 9999); InputStream is = new BufferedInputStream(new FileInp