title: Not result on SSLSocket getInputStream().
body: <p>I'm trying to connect to the server via the HTTPS protocol with SSLSocket. In the browser, the response is normal, but my code does not get answer. If somebody has solution, please help me! Thanks</p>
  
  <pre><code>public static void main(String[] args) throws IOException {
      String urlString = "https://host";
      URL url = new URL(urlString);
  
      Security.addProvider(
              new com.sun.net.ssl.internal.ssl.Provider());
  
      SSLSocketFactory factory = null;
      try {
          factory = ooooo();
      } catch (Exception e) {
          e.printStackTrace();
      }
      SSLSocket socket =
              (SSLSocket)factory.createSocket(url.getHost(),8443);
      socket.setNeedClientAuth(true);
  
      PrintWriter out = new PrintWriter(
              new BufferedWriter(
                      new OutputStreamWriter(
                              socket.getOutputStream())));
  
      socket.addHandshakeCompletedListener(new HandshakeCompletedListener() {
          @Override
          public void handshakeCompleted(HandshakeCompletedEvent handshakeCompletedEvent) {
              System.out.println(handshakeCompletedEvent.getSession());
          }
      });
  
      socket.startHandshake();
      write(out);
      BufferedReader in = new BufferedReader(
              new InputStreamReader(
                      socket.getInputStream()));
  
      String inputLine;
      while ((inputLine = in.readLine()) != null)
          System.out.println(inputLine);
  
      in.close()
      out.close();
      socket.close();
  }
  </code></pre>