Loads this KeyStore from the given input stream.
A password may be given to unlock the keystore (e.g. the keystore resides on a hardware token device), or to check the integrity of the keystore data. If a password is not given for integrity checking, then integrity checking is not performed.
In order to create an empty keystore, or if the keystore cannot be initialized from a stream, pass null
as the stream
argument.
Note that if this keystore has already been loaded, it is reinitialized and loaded again from the given input stream.
@param stream the input stream from which the keystore is loaded,or null
@param password the password used to check the integrity ofthe keystore, the password used to unlock the keystore, or null
@exception IOException if there is an I/O or format problem with thekeystore data, if a password is required but not given, or if the given password was incorrect. If the error is due to a wrong password, the {@link Throwable#getCause cause} of the IOException
should be an UnrecoverableKeyException
@exception NoSuchAlgorithmException if the algorithm used to checkthe integrity of the keystore cannot be found
@exception CertificateException if any of the certificates in thekeystore could not be loaded