Code example for Enumeration

Methods: hasMoreElements, nextElement

0
    public BiometricData(ASN1Sequence seq)
    { 
        Enumeration e = seq.getObjects();
 
        // typeOfBiometricData 
        typeOfBiometricData = TypeOfBiometricData.getInstance(e.nextElement());
        // hashAlgorithm 
        hashAlgorithm = AlgorithmIdentifier.getInstance(e.nextElement());
        // biometricDataHash 
        biometricDataHash = ASN1OctetString.getInstance(e.nextElement());
        // sourceDataUri 
        if (e.hasMoreElements())
        { 
            sourceDataUri = DERIA5String.getInstance(e.nextElement());
        } 
    } 
     
    public BiometricData( 
        TypeOfBiometricData typeOfBiometricData,
        AlgorithmIdentifier hashAlgorithm,
        ASN1OctetString     biometricDataHash,