code: public final void store(OutputStream stream, char[] password)
          throws KeyStoreException, IOException, NoSuchAlgorithmException,
              CertificateException
      {
          if (!initialized) {
              throw new KeyStoreException("Uninitialized keystore");
          }
          keyStoreSpi.engineStore(stream, password);
      }
docs: Stores this keystore to the given output stream, and protects its
  integrity with the given password.
  
  @param stream the output stream to which this keystore is written.
  @param password the password to generate the keystore integrity check
  
  @exception KeyStoreException if the keystore has not been initialized
  (loaded).
  @exception IOException if there was an I/O problem with data
  @exception NoSuchAlgorithmException if the appropriate data integrity
  algorithm could not be found
  @exception CertificateException if any of the certificates included in
  the keystore data could not be stored