Code example for Enumeration

Methods: hasMoreElements, nextElement

0
 
    private RevRepContent(ASN1Sequence seq)
    { 
        Enumeration en = seq.getObjects();
 
        status = ASN1Sequence.getInstance(en.nextElement());
        while (en.hasMoreElements())
        { 
            ASN1TaggedObject tObj = ASN1TaggedObject.getInstance(en.nextElement());
 
            if (tObj.getTagNo() == 0)
            { 
                revCerts = ASN1Sequence.getInstance(tObj, true);
            } 
            else 
            { 
                crls = ASN1Sequence.getInstance(tObj, true);
            } 
        } 
    }