JMRTD 0.4.5

org.jmrtd.lds
Class DG1File

java.lang.Object
  extended by org.jmrtd.lds.PassportFile
      extended by org.jmrtd.lds.DataGroup
          extended by org.jmrtd.lds.DG1File
All Implemented Interfaces:
Serializable

public class DG1File
extends DataGroup
implements Serializable

File structure for the EF_DG1 file. Datagroup 1 contains the Machine Readable Zone information.

Version:
$Revision: 1208 $
Author:
Cees-Bart Breunesse (ceesb@cs.ru.nl), Martijn Oostdijk (martijn.oostdijk@gmail.com)
See Also:
Serialized Form

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
DG1File(InputStream in)
          Creates a new file based on an input stream.
DG1File(MRZInfo mrzInfo)
          Creates a new file based on MRZ information.
 
Method Summary
 boolean equals(Object obj)
           
 byte[] getEncoded()
          Gets the contents of this file as byte array, includes the ICAO tag and length.
 MRZInfo getMRZInfo()
          Gets the MRZ information stored in this file.
 int getTag()
          The data group tag.
 int hashCode()
           
 String toString()
          Gets a textual representation of this file.
 
Methods inherited from class org.jmrtd.lds.DataGroup
getLength
 
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
 

Constructor Detail

DG1File

public DG1File(MRZInfo mrzInfo)
Creates a new file based on MRZ information.

Parameters:
mrzInfo - the MRZ information to store in this file

DG1File

public DG1File(InputStream in)
Creates a new file based on an input stream.

Parameters:
in - an input stream
Throws:
IOException - if something goes wrong
Method Detail

getTag

public int getTag()
The data group tag.

Overrides:
getTag in class DataGroup
Returns:
the tag of the data group

getMRZInfo

public MRZInfo getMRZInfo()
Gets the MRZ information stored in this file.

Returns:
the MRZ information

toString

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

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

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getEncoded

public byte[] getEncoded()
Gets the contents of this file as byte array, includes the ICAO tag and length.

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

JMRTD 0.4.5