try { socket = new Socket(network, port); in = new BufferedReader(new InputStreamReader(socket.getInputStream())); out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); } catch (UnknownHostException uhe) { listener.logerror("Unknown host."); System.exit(0); } catch (IOException ioe) { listener.logerror("IO Exception."); System.exit(0); }
try { socket = new Socket(network, port); in = new BufferedReader(new InputStreamReader(socket.getInputStream())); out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); } catch (UnknownHostException uhe) { listener.logerror("Unknown host."); System.exit(0); } catch (IOException ioe) { listener.logerror("IO Exception trying to connect to server."); System.exit(0); }
  public IRCIO(IRCListener listener, String network, int port) {    this.listener = listener;    this.network = network;    try {      socket = new Socket(network, port);      in = new BufferedReader(new InputStreamReader(socket.getInputStream()));      out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));    } catch (UnknownHostException uhe) {      listener.logerror("Unknown host.");      System.exit(0);    } catch (IOException ioe) {      listener.logerror("IO Exception.");      System.exit(0);    }  }