Builder

The KeyStore.Builder class is used when you want to defer the instantiation of a 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 ...

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.