try
{
int port = 443;
String hostname = "hostname";
SocketFactory socketFactory = SSLSocketFactory.getDefault();
Socket socket = socketFactory.createSocket(hostname, port);
// Create streams to securely send and receive data to the server
InputStream in = socket.getInputStream();
OutputStream out = socket.getOutputStream();
// Read from in and write to out...
// Close the socket
in.close();
out.close();
}
catch(IOException e)
{
}
'Java' 카테고리의 다른 글
[Java] X Window 없이 JDK 1.3 + PJA Toolkit 으로 썸네일 구현하기 (0) | 2007.04.14 |
---|---|
[UNIX] crontab에서 자바프로그램 실행(한글문제 해결법) (1) | 2007.04.11 |
[Java] Singleton 패턴... (0) | 2007.01.09 |
[Java] ftp client (0) | 2007.01.09 |
[Java] 한글체크 (0) | 2007.01.09 |