JMRTD 0.4.5

org.jmrtd.lds
Class CVCAFile

java.lang.Object
  extended by org.jmrtd.lds.PassportFile
      extended by org.jmrtd.lds.CVCAFile

public class CVCAFile
extends PassportFile


Field Summary
static byte CAR_TAG
           
static int LENGTH
           
 
Fields inherited from class org.jmrtd.lds.PassportFile
EF_COM_TAG, EF_DG1_TAG, EF_DG10_TAG, EF_DG11_TAG, EF_DG12_TAG, EF_DG13_TAG, EF_DG14_TAG, EF_DG15_TAG, EF_DG16_TAG, EF_DG2_TAG, EF_DG3_TAG, EF_DG4_TAG, EF_DG5_TAG, EF_DG6_TAG, EF_DG7_TAG, EF_DG8_TAG, EF_DG9_TAG, EF_SOD_TAG
 
Constructor Summary
CVCAFile(InputStream in)
          Constructs a new CVCA file from the data contained in in.
CVCAFile(String caReference)
          Constructs a new CVCA file with the given certificate reference
CVCAFile(String caReference, String altCaReference)
          Constructs a new CVCA file with the given certificate references
 
Method Summary
 boolean equals(Object other)
           
 org.jmrtd.cert.CVCPrincipal getAltCAReference()
          Returns the second (alternative) CA Certificate identifier, null if none exists.
 org.jmrtd.cert.CVCPrincipal getCAReference()
          Returns the CA Certificate identifier
 byte[] getEncoded()
          Gets the contents of this file as byte array, includes the ICAO tag and length.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class org.jmrtd.lds.PassportFile
createPassportFile, lookupDataGroupNumberByTag, lookupFIDByDataGroupNumber, lookupFIDByTag, lookupTagByDataGroupNumber, lookupTagByFID, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CAR_TAG

public static final byte CAR_TAG
See Also:
Constant Field Values

LENGTH

public static final int LENGTH
See Also:
Constant Field Values
Constructor Detail

CVCAFile

public CVCAFile(InputStream in)
Constructs a new CVCA file from the data contained in in.

Parameters:
in - stream with the data to be parsed

CVCAFile

public CVCAFile(String caReference,
                String altCaReference)
Constructs a new CVCA file with the given certificate references

Parameters:
caReference - main CA certificate reference
altCaReference - second (alternative) CA certificate reference

CVCAFile

public CVCAFile(String caReference)
Constructs a new CVCA file with the given certificate reference

Parameters:
caReference - main CA certificate reference
Method Detail

getEncoded

public byte[] getEncoded()
Description copied from class: PassportFile
Gets the contents of this file as byte array, includes the ICAO tag and length.

Specified by:
getEncoded in class PassportFile
Returns:
a byte array containing the file

getCAReference

public org.jmrtd.cert.CVCPrincipal getCAReference()
Returns the CA Certificate identifier

Returns:
the CA Certificate identifier

getAltCAReference

public org.jmrtd.cert.CVCPrincipal getAltCAReference()
Returns the second (alternative) CA Certificate identifier, null if none exists.

Returns:
the second (alternative) CA Certificate identifier

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

JMRTD 0.4.5