question: public static X509Certificate readX509Certificate ( URL url ) throws IOException , CertificateException { URLConnection connection = url . openConnection ( ) ; InputStream is = connection . getInputStream ( ) ; try { CertificateFactory servercf = CertificateFactory . getInstance ( "X.509" ) ; return ( X509Certificate ) servercf . generateCertificate ( is ) ; } finally { is . close ( ) ; } }
target:  Load X.509 Certificate from an url