Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.bouncycastle.asn1.icao;
 
 
The DataGroupHash object.
 DataGroupHash  ::=  SEQUENCE {
      dataGroupNumber         DataGroupNumber,
      dataGroupHashValue     OCTET STRING }
 
 DataGroupNumber ::= INTEGER {
         dataGroup1    (1),
         dataGroup1    (2),
         dataGroup1    (3),
         dataGroup1    (4),
         dataGroup1    (5),
         dataGroup1    (6),
         dataGroup1    (7),
         dataGroup1    (8),
         dataGroup1    (9),
         dataGroup1    (10),
         dataGroup1    (11),
         dataGroup1    (12),
         dataGroup1    (13),
         dataGroup1    (14),
         dataGroup1    (15),
         dataGroup1    (16) }
 
 
public class DataGroupHash 
    extends ASN1Object
    ASN1Integer dataGroupNumber;    
    
    public static DataGroupHash getInstance(
        Object obj)
    {
        if (obj instanceof DataGroupHash)
        {
            return (DataGroupHash)obj;
        }
        else if (obj != null)
        {
            return new DataGroupHash(ASN1Sequence.getInstance(obj));
        }
        return null;
    }                
            
    private DataGroupHash(ASN1Sequence seq)
    {
        Enumeration e = seq.getObjects();
        // dataGroupNumber
         = ASN1Integer.getInstance(e.nextElement());
        // dataGroupHashValue
         = ASN1OctetString.getInstance(e.nextElement());   
    }
    
    public DataGroupHash(
        int dataGroupNumber,        
        ASN1OctetString     dataGroupHashValue)
    {
        this. = new ASN1Integer(dataGroupNumber);
        this. = dataGroupHashValue
    }    
    public int getDataGroupNumber()
    {
        return .getValue().intValue();
    }
    
    {
        return ;
    }     
    
    public ASN1Primitive toASN1Primitive()
    {
        ASN1EncodableVector seq = new ASN1EncodableVector();
        seq.add();
        seq.add();  
        return new DERSequence(seq);
    }
New to GrepCode? Check out our FAQ X