コード例 #1
0
 /**
  * sets the java certstore to this extended pkix parameters.
  *
  * @throws classcastexception if an element of <code>stores</code> is not a <code>certstore</code>
  *     .
  */
 public void setcertstores(list stores) {
   if (stores != null) {
     iterator it = stores.iterator();
     while (it.hasnext()) {
       addcertstore((certstore) it.next());
     }
   }
 }
コード例 #2
0
 /**
  * sets the bouncy castle stores for finding crls, certificates, attribute certificates or cross
  * certificates.
  *
  * <p>the <code>list</code> is cloned.
  *
  * @param stores a list of stores to use.
  * @see #getstores
  * @throws classcastexception if an element of <code>stores</code> is not a {@link store}.
  */
 public void setstores(list stores) {
   if (stores == null) {
     this.stores = new arraylist();
   } else {
     for (iterator i = stores.iterator(); i.hasnext(); ) {
       if (!(i.next() instanceof store)) {
         throw new classcastexception(
             "all elements of list must be " + "of type org.bouncycastle.util.store.");
       }
     }
     this.stores = new arraylist(stores);
   }
 }