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)
{
}

+ Recent posts