JMRTD 0.4.5

org.jmrtd.lds
Class DataGroup

java.lang.Object
  extended by org.jmrtd.lds.PassportFile
      extended by org.jmrtd.lds.DataGroup
Direct Known Subclasses:
DG11File, DG12File, DG14File, DG15File, DG1File, DG2File, DG3File, DG4File, DG5File, DG6File, DG7File

public abstract class DataGroup
extends PassportFile

Super class for data group files.

Version:
$Revision: 1208 $
Author:
Martijn Oostdijk (martijn.oostdijk@gmail.com)

Field Summary
 
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
protected DataGroup(InputStream in)
          Constructs a datagroup from the DER encoded data in the given input stream.
 
Method Summary
abstract  byte[] getEncoded()
          Gets the contents of this file as byte array, includes the ICAO tag and length.
 int getLength()
          The length of the value of the data group.
 int getTag()
          The data group tag.
 String toString()
          Gets a textual representation of this file.
 
Methods inherited from class org.jmrtd.lds.PassportFile
createPassportFile, lookupDataGroupNumberByTag, lookupFIDByDataGroupNumber, lookupFIDByTag, lookupTagByDataGroupNumber, lookupTagByFID, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataGroup

protected DataGroup(InputStream in)
Constructs a datagroup from the DER encoded data in the given input stream. Tag and length are read, so the input stream is positioned just before the value.

Parameters:
in - an input stream
Method Detail

getEncoded

public abstract 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

toString

public String toString()
Gets a textual representation of this file.

Overrides:
toString in class Object
Returns:
a textual representation of this file

getTag

public int getTag()
The data group tag.

Returns:
the tag of the data group

getLength

public int getLength()
The length of the value of the data group.

Returns:
the length of the value of the data group

JMRTD 0.4.5