FileDocCategorySizeDatePackage
CertStoreCollectionSpi.javaAPI DocAndroid 1.5 API2770Wed May 06 22:41:06 BST 2009org.bouncycastle.jce.provider

CertStoreCollectionSpi

public class CertStoreCollectionSpi extends CertStoreSpi

Fields Summary
private CollectionCertStoreParameters
params
Constructors Summary
public CertStoreCollectionSpi(CertStoreParameters params)

        super(params);

        if (!(params instanceof CollectionCertStoreParameters))
        {
            throw new InvalidAlgorithmParameterException("org.bouncycastle.jce.provider.CertStoreCollectionSpi: parameter must be a CollectionCertStoreParameters object\n" +  params.toString());
        }

        this.params = (CollectionCertStoreParameters)params;
    
Methods Summary
public java.util.CollectionengineGetCRLs(java.security.cert.CRLSelector selector)

        Set         col = new HashSet();
        Iterator    iter = params.getCollection().iterator();

        if (selector == null)
        {
            while (iter.hasNext())
            {
                Object obj = iter.next();

                if (obj instanceof CRL)
                {
                    col.add(obj);
                }
            }
        }
        else
        {
            while (iter.hasNext())
            {
                Object obj = iter.next();

                if ((obj instanceof CRL) && selector.match((CRL)obj))
                {
                    col.add(obj);
                }
            }
        }
        
        return col;
    
public java.util.CollectionengineGetCertificates(java.security.cert.CertSelector selector)

        Set         col = new HashSet();
        Iterator    iter = params.getCollection().iterator();

        if (selector == null)
        {
            while (iter.hasNext())
            {
                Object obj = iter.next();

                if (obj instanceof Certificate)
                {
                    col.add(obj);
                }
            }
        }
        else
        {
            while (iter.hasNext())
            {
                Object obj = iter.next();

                if ((obj instanceof Certificate) && selector.match((Certificate)obj))
                {
                    col.add(obj);
                }
            }
        }
        
        return col;