Code example for UnknownHostException

Methods: printStackTrace

0
            bufferedwriter = new BufferedWriter(outputstreamwriter);
            pw = new PrintWriter(bufferedwriter, true);
            pw.print(eventInput);
            bufferedwriter.flush();
        } catch (UnknownHostException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally { 
            pw.close();
        } 
 
        /** 
        SSLSocketFactory sslsocketfactory = null; 
        SSLSocket sslsocket = null; 
        PrintWriter pw = null; 
        OutputStreamWriter outputstreamwriter = null; 
        BufferedWriter bufferedwriter = null; 
        try { 
            sslsocketfactory = (SSLSocketFactory) SSLSocketFactory.getDefault(); 
            sslsocket = (SSLSocket) sslsocketfactory.createSocket(splunkIPAddr,