import java.io.*; public class SocketConnection { static void logFile(String nomeFile, String daSalvare) throws IOException { FileOutputStream fout = new FileOutputStream(nomeFile); OutputStreamWriter out = new OutputStreamWriter(fout); PrintWriter log = new PrintWriter(out); log.println(daSalvare); log.close(); } public static void main(String[] args) { try { SocketConnectionHTTP connection = new SocketConnectionHTTP(); String temp = connection.getDocument(); //String temp; connection.close(); SocketConnection.logFile("pagina1.html", temp); //SocketConnectionSMTP connection2 = new SocketConnectionSMTP(); //System.out.println(connection2.sendMail()); //connection2.close(); //URLConnectionTest connection3 = new URLConnectionTest(); //temp = connection3.getDocument(); //SocketConnection.logFile("pagina2.html", temp); } catch (IOException e) { System.out.println("Error" + e); } } }