Next, we need to create some KeyStore objects. We
create an empty KeyStore using the static method
KeyStore.getInstance(), and initialize it using its
load() method, as illustrated below:
private void setupServerKeystore()
throws GeneralSecurityException, IOException {
serverKeyStore = KeyStore.getInstance( "JKS" );
serverKeyStore.load( new FileInputStream( "server.public" ),
passphrase.toCharArray() );
}
Note that we've created a KeyStore of type "JKS";
this is the standard keystore format used in JCA.