question: public void importCerts ( String [ ] certFileNames , String aliasPrefix ) throws CertificateException , IOException , KeyStoreException , NoSuchAlgorithmException { if ( certFileNames == null ) { return ; } CertificateFactory certFactory = CertificateFactory . getInstance ( "X.509" ) ; for ( String fn : certFileNames ) { InputStream inStream = new FileInputStream ( fn ) ; X509Certificate cert = ( X509Certificate ) certFactory . generateCertificate ( inStream ) ; inStream . close ( ) ; String alias = aliasPrefix == null ? fn : aliasPrefix + fn ; _keyStore . setCertificateEntry ( alias , cert ) ; } }
target:  Import a list of certs to keystore.