?? netclient_tang.java
字號:
package com.jk.test;
import java.util.*;
import java.io.*;
import java.net.*;
public class NetClient_tang {
private String address = "127.0.0.1";
private int port = 8888;
private Socket s = null;
OutputStream os = null;
ObjectOutputStream oos = null;
public void send(Collection c) {
try{
s = new Socket(address,port);
/*os = s.getOutputStream();
oos = new ObjectOutputStream(os);*/
oos = new ObjectOutputStream(s.getOutputStream());
oos.writeObject(c);
oos.flush();
oos.close();
s.close();
}catch(Exception e){
e.printStackTrace();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -