FileDocCategorySizeDatePackage
TypeOfBiometricData.javaAPI DocAndroid 1.5 API2633Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.x509.qualified

TypeOfBiometricData

public class TypeOfBiometricData extends org.bouncycastle.asn1.ASN1Encodable implements org.bouncycastle.asn1.ASN1Choice
The TypeOfBiometricData object.
TypeOfBiometricData ::= CHOICE {
predefinedBiometricType PredefinedBiometricType,
biometricDataOid OBJECT IDENTIFIER }

PredefinedBiometricType ::= INTEGER {
picture(0),handwritten-signature(1)}
(picture|handwritten-signature)

Fields Summary
public static final int
PICTURE
public static final int
HANDWRITTEN_SIGNATURE
org.bouncycastle.asn1.DEREncodable
obj
Constructors Summary
public TypeOfBiometricData(int predefinedBiometricType)

        if (predefinedBiometricType == PICTURE || predefinedBiometricType == HANDWRITTEN_SIGNATURE)
        {
                obj = new DERInteger(predefinedBiometricType);
        }
        else
        {
            throw new IllegalArgumentException("unknow PredefinedBiometricType : " + predefinedBiometricType);
        }        
    
public TypeOfBiometricData(org.bouncycastle.asn1.DERObjectIdentifier BiometricDataID)

        obj = BiometricDataID;
    
Methods Summary
public org.bouncycastle.asn1.DERObjectIdentifiergetBiometricDataOid()

        return (DERObjectIdentifier)obj;
    
public static org.bouncycastle.asn1.x509.qualified.TypeOfBiometricDatagetInstance(java.lang.Object obj)


        
    
        if (obj == null || obj instanceof TypeOfBiometricData)
        {
            return (TypeOfBiometricData)obj;
        }

        if (obj instanceof DERInteger)
        {
            DERInteger predefinedBiometricTypeObj = DERInteger.getInstance(obj);
            int  predefinedBiometricType = predefinedBiometricTypeObj.getValue().intValue();

            return new TypeOfBiometricData(predefinedBiometricType);
        }
        else if (obj instanceof DERObjectIdentifier)
        {
            DERObjectIdentifier BiometricDataID = DERObjectIdentifier.getInstance(obj);
            return new TypeOfBiometricData(BiometricDataID);
        }

        throw new IllegalArgumentException("unknown object in getInstance");
    
public intgetPredefinedBiometricType()

        return ((DERInteger)obj).getValue().intValue();
    
public booleanisPredefined()

        return obj instanceof DERInteger;
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()

        
        return obj.getDERObject();