/** * Performs the same action as {@link #load(InputStream, char[])} except a {@link LoadKey} is returned that can be used to revert the load. * * @param inputStream the stream to load from or {@code null} * @param password the password used to protect the contents of the {@link KeyStore} or {@code null} * @return a {@link LoadKey} that can be used to revert the load and restore the previous {@link KeyStore} state * @throws NoSuchAlgorithmException if the keystore cannot be read due to a missing algorithm * @throws CertificateException if the keystore cannot be read due to a certificate problem * @throws IOException if the keystore cannot be read due to an I/O problem */ public LoadKey revertibleLoad(final InputStream inputStream, final char[] password) throws NoSuchAlgorithmException, CertificateException, IOException { KeyStore current = keyStoreSpi.getCurrentKeyStore(); if (current == null) { throw log.reversibleLoadNotPossible(); } load(inputStream, password); return new LoadKey(current); }
/** * Performs the same action as {@link #load(InputStream, char[])} except a {@link LoadKey} is returned that can be used to revert the load. * * @param inputStream the stream to load from or {@code null} * @param password the password used to protect the contents of the {@link KeyStore} or {@code null} * @return a {@link LoadKey} that can be used to revert the load and restore the previous {@link KeyStore} state * @throws NoSuchAlgorithmException if the keystore cannot be read due to a missing algorithm * @throws CertificateException if the keystore cannot be read due to a certificate problem * @throws IOException if the keystore cannot be read due to an I/O problem */ public LoadKey revertibleLoad(final InputStream inputStream, final char[] password) throws NoSuchAlgorithmException, CertificateException, IOException { KeyStore current = keyStoreSpi.getCurrentKeyStore(); if (current == null) { throw log.reversibleLoadNotPossible(); } load(inputStream, password); return new LoadKey(current); }
/** * Performs the same action as {@link #load(InputStream, char[])} except a {@link LoadKey} is returned that can be used to revert the load. * * @param inputStream the stream to load from or {@code null} * @param password the password used to protect the contents of the {@link KeyStore} or {@code null} * @return a {@link LoadKey} that can be used to revert the load and restore the previous {@link KeyStore} state * @throws NoSuchAlgorithmException if the keystore cannot be read due to a missing algorithm * @throws CertificateException if the keystore cannot be read due to a certificate problem * @throws IOException if the keystore cannot be read due to an I/O problem */ public LoadKey revertibleLoad(final InputStream inputStream, final char[] password) throws NoSuchAlgorithmException, CertificateException, IOException { KeyStore current = keyStoreSpi.getCurrentKeyStore(); if (current == null) { throw log.reversibleLoadNotPossible(); } load(inputStream, password); return new LoadKey(current); }
/** * Performs the same action as {@link #load(InputStream, char[])} except a {@link LoadKey} is returned that can be used to revert the load. * * @param inputStream the stream to load from or {@code null} * @param password the password used to protect the contents of the {@link KeyStore} or {@code null} * @return a {@link LoadKey} that can be used to revert the load and restore the previous {@link KeyStore} state * @throws NoSuchAlgorithmException if the keystore cannot be read due to a missing algorithm * @throws CertificateException if the keystore cannot be read due to a certificate problem * @throws IOException if the keystore cannot be read due to an I/O problem */ public LoadKey revertibleLoad(final InputStream inputStream, final char[] password) throws NoSuchAlgorithmException, CertificateException, IOException { KeyStore current = keyStoreSpi.getCurrentKeyStore(); if (current == null) { throw log.reversibleLoadNotPossible(); } load(inputStream, password); return new LoadKey(current); }