FileDocCategorySizeDatePackage
CommitmentTypeQualifier.javaAPI DocAndroid 1.5 API3057Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.esf

CommitmentTypeQualifier

public class CommitmentTypeQualifier extends org.bouncycastle.asn1.ASN1Encodable
Commitment type qualifiers, used in the Commitment-Type-Indication attribute (RFC3126).
CommitmentTypeQualifier ::= SEQUENCE {
commitmentTypeIdentifier CommitmentTypeIdentifier,
qualifier ANY DEFINED BY commitmentTypeIdentifier OPTIONAL }

Fields Summary
private org.bouncycastle.asn1.DERObjectIdentifier
commitmentTypeIdentifier
private org.bouncycastle.asn1.DEREncodable
qualifier
Constructors Summary
public CommitmentTypeQualifier(org.bouncycastle.asn1.DERObjectIdentifier commitmentTypeIdentifier)
Creates a new CommitmentTypeQualifier instance.

param
commitmentTypeIdentifier a CommitmentTypeIdentifier value

        this(commitmentTypeIdentifier, null);
    
public CommitmentTypeQualifier(org.bouncycastle.asn1.DERObjectIdentifier commitmentTypeIdentifier, org.bouncycastle.asn1.DEREncodable qualifier)
Creates a new CommitmentTypeQualifier instance.

param
commitmentTypeIdentifier a CommitmentTypeIdentifier value
param
qualifier the qualifier, defined by the above field.

        this.commitmentTypeIdentifier = commitmentTypeIdentifier;
        this.qualifier = qualifier;
    
public CommitmentTypeQualifier(org.bouncycastle.asn1.ASN1Sequence as)
Creates a new CommitmentTypeQualifier instance.

param
as CommitmentTypeQualifier structure encoded as an ASN1Sequence.

        commitmentTypeIdentifier = (DERObjectIdentifier)as.getObjectAt(0);
        
        if (as.size() > 1)
        {
            qualifier = as.getObjectAt(1);
        }
    
Methods Summary
public org.bouncycastle.asn1.DERObjectIdentifiergetCommitmentTypeIdentifier()

        return commitmentTypeIdentifier;
    
public static org.bouncycastle.asn1.esf.CommitmentTypeQualifiergetInstance(java.lang.Object as)

        if (as instanceof CommitmentTypeQualifier || as == null)
        {
            return (CommitmentTypeQualifier)as;
        }
        else if (as instanceof ASN1Sequence)
        {
            return new CommitmentTypeQualifier((ASN1Sequence)as);
        }

        throw new IllegalArgumentException("unknown object in getInstance.");
    
public org.bouncycastle.asn1.DEREncodablegetQualifier()

        return qualifier;
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()
Returns a DER-encodable representation of this instance.

return
a DERObject value

      ASN1EncodableVector dev = new ASN1EncodableVector();
      dev.add(commitmentTypeIdentifier);
      if (qualifier != null)
      {
          dev.add(qualifier);
      }

      return new DERSequence(dev);