The KeyStore.Builder class is used when you want to defer the instantiation of KeyStore:
public abstract static class KeyStore.Builder extends Object
This class provides the necessary information for instantiating a KeyStore object. The class has the following methods:
- public abstract KeyStore getKeyStore() throws KeyStoreException.
- public abstractKeyStore.ProtectionParameter getProjectionParameter(String alias) throws KeyStoreException.
- Three options for newInstance:
- public static KeyStore.Builder newInstance(KeyStore keyStore, KeyStore.ProtectionParameter protectionParameter)
- public static KeyStore.Builder newInstance(String type, Provider provider, File file, KeyStore.ProtectionParameter protection)
- public static KeyStore.Builder newInstance(String type, Provider provider, KeyStore.ProtectionParameter protection)