From 985197838489dcee76bb06b2e4dd8825aa73f42a Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 19 Jan 2009 23:44:28 +0100 Subject: [PATCH] Add method to create a new key store. --- src/net/pterodactylus/jkeytool/core/Core.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/net/pterodactylus/jkeytool/core/Core.java b/src/net/pterodactylus/jkeytool/core/Core.java index 44fc7bb..7579fbf 100644 --- a/src/net/pterodactylus/jkeytool/core/Core.java +++ b/src/net/pterodactylus/jkeytool/core/Core.java @@ -75,6 +75,21 @@ public class Core { // /** + * Creates a new key store of the given type. + * + * @param keyStoreType + * The type of the key store + */ + public void createKeyStore(String keyStoreType) { + try { + KeyStore keyStore = KeyStore.getInstance(keyStoreType); + coreListenerSupport.fireKeyStoreCreated(keyStore); + } catch (KeyStoreException kse1) { + coreListenerSupport.fireKeyStoreNotCreated(keyStoreType, kse1); + } + } + + /** * Loads a keystore from the given file. This method will fire either a * {@link CoreListener#keyStoreLoaded(File, KeyStore)} or a * {@link CoreListener#keyStoreNotLoaded(File)} event, depending on whether -- 2.7.4