此代码为客户端负责发送
public class clientDemo {
public static void main(String[] args) throws Exception{
//输入对方接收的ip地址和端口号
Socket socket = new Socket(InetAddress.getByName("127.0.0.1"),9000);
//创建输出流
OutputStream outputStream = socket.getOutputStream();
//创建接受文件流
FileInputStream fileInputStream = new FileInputStream(new File("yuanshi.jpg"));
//创建缓冲数组
byte[] buffer = new byte[1024];
int len =