Code example for AllowAllHostnameVerifier

0
		             } 
		         } 
		     }; 
		 
		 
        HttpsURLConnection.setDefaultHostnameVerifier(new AllowAllHostnameVerifier());
        SSLContext sc;
		try { 
			sc = SSLContext.getInstance("TLS");	// SSL
			sc.init(null, trustAllCerts, new java.security.SecureRandom());
		    HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
		} catch (NoSuchAlgorithmException e1) {
			// TODO Auto-generated catch block 
			e1.printStackTrace();
		} catch (KeyManagementException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} 
		new httpConnection().execute(straddr);
//	    URL urlDoc; 
//	    HttpsURLConnection urlconn = null;