Code example for URL

Methods: toURI

0
  public void untagSocket(Socket socket) throws SocketException {
  } 
 
  public URI toUriLenient(URL url) throws URISyntaxException {
    return url.toURI(); // this isn't as good as the built-in toUriLenient
  } 
 
  /** 
   * Attempt a TLS connection with useful extensions enabled. This mode 
   * supports more features, but is less likely to be compatible with older 
   * HTTPS servers. 
   */ 
  public void enableTlsExtensions(SSLSocket socket, String uriHost) {
  } 
 
  /** 
   * Attempt a secure connection with basic functionality to maximize 
   * compatibility. Currently this uses SSL 3.0. 
   */ 
  public void supportTlsIntolerantServer(SSLSocket socket) {
    socket.setEnabledProtocols(new String[] {"SSLv3"});