issrg.ac
Class AttCertVersion

java.lang.Object
  extended by issrg.ac.AttCertVersion
All Implemented Interfaces:
java.lang.Cloneable

public class AttCertVersion
extends java.lang.Object
implements java.lang.Cloneable

This class represents the AttCertVersion ASN.1 construct. It has two predefined integers in it: V1 and V2, but you can always specify your own.


Field Summary
static java.math.BigInteger DEFAULT
           
static java.math.BigInteger V1
           
static java.math.BigInteger V2
           
protected  java.math.BigInteger version
           
 
Constructor Summary
AttCertVersion()
          This constructor creates an object with the version set to default (V1).
AttCertVersion(ASN1Object ao)
          This constructor creates the AttCertVersion from a given ASN1Object.
 
Method Summary
 java.lang.Object clone()
           
 void decode(ASN1Object ao)
          This method decodes and sets the version from a given ASN1Object.
 java.math.BigInteger getVersion()
          Returns the version of the AC.
 void setVersion(java.math.BigInteger version)
          Sets the version of the AC.
 ASN1Object toASN1Object()
          This method returns the ASN1Object of the version.
 java.lang.String toString()
           
 java.lang.String toString(java.lang.String ident)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

V1

public static final java.math.BigInteger V1

V2

public static final java.math.BigInteger V2

DEFAULT

public static final java.math.BigInteger DEFAULT

version

protected java.math.BigInteger version
Constructor Detail

AttCertVersion

public AttCertVersion()
This constructor creates an object with the version set to default (V1).


AttCertVersion

public AttCertVersion(ASN1Object ao)
               throws CodingException
This constructor creates the AttCertVersion from a given ASN1Object.

Parameters:
ao - - the ASN1Object containing an INTEGER with the version; if null, the default version is assumed (V1)
Throws:
CodingException
Method Detail

getVersion

public java.math.BigInteger getVersion()
Returns the version of the AC. By default is set to V1.


setVersion

public void setVersion(java.math.BigInteger version)
Sets the version of the AC. Note that the semantics of this setting is enforced by the programmer; the version is not checked anywhere in this library.


toASN1Object

public ASN1Object toASN1Object()
                        throws CodingException
This method returns the ASN1Object of the version.

Returns:
INTEGER with the version
Throws:
CodingException

decode

public void decode(ASN1Object ao)
            throws CodingException
This method decodes and sets the version from a given ASN1Object.

Parameters:
ao - - the ASN1Object with the version; it must be an INTEGER; if null, the default version is assumed
Throws:
CodingException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(java.lang.String ident)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object