question: public void save ( File keyStore , String type , char [ ] password , char [ ] keyPassword , String caAlias ) throws GeneralSecurityException , IOException { KeyStore store = KeyStore . getInstance ( type ) ; store . load ( null , password ) ; store . setKeyEntry ( caAlias , caKey , keyPassword , caCerts ) ; OutputStream out = new FileOutputStream ( keyStore ) ; try { store . store ( out , password ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; } finally { out . close ( ) ; } }
target:  Saves the CA key and the Certificate chain to the specified keystore