Package org.jmrtd.lds.icao
Class DG12File
- java.lang.Object
-
- org.jmrtd.lds.AbstractTaggedLDSFile
-
- org.jmrtd.lds.DataGroup
-
- org.jmrtd.lds.icao.DG12File
-
- All Implemented Interfaces:
Serializable
,LDSElement
,LDSFile
public class DG12File extends DataGroup
File structure for the EF_DG12 file. Datagroup 12 contains additional document detail(s).- Version:
- $Revision: 1802 $
- Author:
- The JMRTD team ([email protected])
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONTENT_SPECIFIC_CONSTRUCTED_TAG
static int
COUNT_TAG
static int
DATE_AND_TIME_OF_PERSONALIZATION_TAG
static int
DATE_OF_ISSUE_TAG
static int
ENDORSEMENTS_AND_OBSERVATIONS_TAG
static int
IMAGE_OF_FRONT_TAG
static int
IMAGE_OF_REAR_TAG
static int
ISSUING_AUTHORITY_TAG
static int
NAME_OF_OTHER_PERSON_TAG
static int
PERSONALIZATION_SYSTEM_SERIAL_NUMBER_TAG
static int
TAX_OR_EXIT_REQUIREMENTS_TAG
-
Fields inherited from interface org.jmrtd.lds.LDSFile
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
Constructors Constructor Description DG12File(InputStream inputStream)
Constructs a new file.DG12File(String issuingAuthority, String dateOfIssue, List<String> namesOfOtherPersons, String endorsementsAndObservations, String taxOrExitRequirements, byte[] imageOfFront, byte[] imageOfRear, String dateAndTimeOfPersonalization, String personalizationSystemSerialNumber)
Constructs a new file.DG12File(String issuingAuthority, Date dateOfIssue, List<String> namesOfOtherPersons, String endorsementsAndObservations, String taxOrExitRequirements, byte[] imageOfFront, byte[] imageOfRear, Date dateAndTimeOfPersonalization, String personalizationSystemSerialNumber)
Constructs a new file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getDateAndTimeOfPersonalization()
Returns the date and time of personalization.String
getDateOfIssue()
Returns the date of issuance.byte[]
getEncoded()
Returns the contents of this file as byte array, includes the ICAO tag and length.String
getEndorsementsAndObservations()
Returns endorsements and observations.byte[]
getImageOfFront()
Returns image of front.byte[]
getImageOfRear()
Returns image of rear.String
getIssuingAuthority()
Returns the issuing authority.List<String>
getNamesOfOtherPersons()
Returns name of other person.String
getPersonalizationSystemSerialNumber()
Returns the personalization system serial number.int
getTag()
Returns the tag that identifies this LDS file.List<Integer>
getTagPresenceList()
Returns the tags of fields actually present in this file.String
getTaxOrExitRequirements()
Returns tax or exit requirements.int
hashCode()
protected void
readContent(InputStream inputStream)
Reads the contents of the data group from an input stream.String
toString()
Returns a textual representation of this file.protected void
writeContent(OutputStream outputStream)
Writes the contents of the data group to an output stream.-
Methods inherited from class org.jmrtd.lds.AbstractTaggedLDSFile
getLength, readObject, writeObject
-
-
-
-
Field Detail
-
ISSUING_AUTHORITY_TAG
public static final int ISSUING_AUTHORITY_TAG
- See Also:
- Constant Field Values
-
DATE_OF_ISSUE_TAG
public static final int DATE_OF_ISSUE_TAG
- See Also:
- Constant Field Values
-
NAME_OF_OTHER_PERSON_TAG
public static final int NAME_OF_OTHER_PERSON_TAG
- See Also:
- Constant Field Values
-
ENDORSEMENTS_AND_OBSERVATIONS_TAG
public static final int ENDORSEMENTS_AND_OBSERVATIONS_TAG
- See Also:
- Constant Field Values
-
TAX_OR_EXIT_REQUIREMENTS_TAG
public static final int TAX_OR_EXIT_REQUIREMENTS_TAG
- See Also:
- Constant Field Values
-
IMAGE_OF_FRONT_TAG
public static final int IMAGE_OF_FRONT_TAG
- See Also:
- Constant Field Values
-
IMAGE_OF_REAR_TAG
public static final int IMAGE_OF_REAR_TAG
- See Also:
- Constant Field Values
-
DATE_AND_TIME_OF_PERSONALIZATION_TAG
public static final int DATE_AND_TIME_OF_PERSONALIZATION_TAG
- See Also:
- Constant Field Values
-
PERSONALIZATION_SYSTEM_SERIAL_NUMBER_TAG
public static final int PERSONALIZATION_SYSTEM_SERIAL_NUMBER_TAG
- See Also:
- Constant Field Values
-
CONTENT_SPECIFIC_CONSTRUCTED_TAG
public static final int CONTENT_SPECIFIC_CONSTRUCTED_TAG
- See Also:
- Constant Field Values
-
COUNT_TAG
public static final int COUNT_TAG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DG12File
public DG12File(String issuingAuthority, Date dateOfIssue, List<String> namesOfOtherPersons, String endorsementsAndObservations, String taxOrExitRequirements, byte[] imageOfFront, byte[] imageOfRear, Date dateAndTimeOfPersonalization, String personalizationSystemSerialNumber)
Constructs a new file.- Parameters:
issuingAuthority
- the issuing authoritydateOfIssue
- the date of issuenamesOfOtherPersons
- names of other personsendorsementsAndObservations
- endorsements and observationstaxOrExitRequirements
- tax or exit requirementsimageOfFront
- image of frontimageOfRear
- image of reardateAndTimeOfPersonalization
- date and time of personalizationpersonalizationSystemSerialNumber
- personalization system serial number
-
DG12File
public DG12File(String issuingAuthority, String dateOfIssue, List<String> namesOfOtherPersons, String endorsementsAndObservations, String taxOrExitRequirements, byte[] imageOfFront, byte[] imageOfRear, String dateAndTimeOfPersonalization, String personalizationSystemSerialNumber)
Constructs a new file.- Parameters:
issuingAuthority
- the issuing authoritydateOfIssue
- the date of issuenamesOfOtherPersons
- names of other personsendorsementsAndObservations
- endorsements and observationstaxOrExitRequirements
- tax or exit requirementsimageOfFront
- image of frontimageOfRear
- image of reardateAndTimeOfPersonalization
- date and time of personalizationpersonalizationSystemSerialNumber
- personalization system serial number
-
DG12File
public DG12File(InputStream inputStream) throws IOException
Constructs a new file.- Parameters:
inputStream
- an input stream- Throws:
IOException
- on error reading from input stream
-
-
Method Detail
-
readContent
protected void readContent(InputStream inputStream) throws IOException
Description copied from class:AbstractTaggedLDSFile
Reads the contents of the data group from an input stream. Client code implementing this method should only read the contents from the input stream, not the tag or length of the data group.- Specified by:
readContent
in classAbstractTaggedLDSFile
- Parameters:
inputStream
- the input stream to read from- Throws:
IOException
- on error reading from input stream
-
writeContent
protected void writeContent(OutputStream outputStream) throws IOException
Description copied from class:AbstractTaggedLDSFile
Writes the contents of the data group to an output stream. Client code implementing this method should only write the contents to the output stream, not the tag or length of the data group.- Specified by:
writeContent
in classAbstractTaggedLDSFile
- Parameters:
outputStream
- the output stream to write to- Throws:
IOException
- on error writing to output stream
-
getTagPresenceList
public List<Integer> getTagPresenceList()
Returns the tags of fields actually present in this file.- Returns:
- a list of tags
-
getIssuingAuthority
public String getIssuingAuthority()
Returns the issuing authority.- Returns:
- the issuingAuthority
-
getDateOfIssue
public String getDateOfIssue()
Returns the date of issuance.- Returns:
- the dateOfIssue
-
getNamesOfOtherPersons
public List<String> getNamesOfOtherPersons()
Returns name of other person.- Returns:
- the nameOfOtherPerson
-
getEndorsementsAndObservations
public String getEndorsementsAndObservations()
Returns endorsements and observations.- Returns:
- the endorsementsAndObservations
-
getTaxOrExitRequirements
public String getTaxOrExitRequirements()
Returns tax or exit requirements.- Returns:
- the taxOrExitRequirements
-
getImageOfFront
public byte[] getImageOfFront()
Returns image of front.- Returns:
- the imageOfFront
-
getImageOfRear
public byte[] getImageOfRear()
Returns image of rear.- Returns:
- the imageOfRear
-
getDateAndTimeOfPersonalization
public String getDateAndTimeOfPersonalization()
Returns the date and time of personalization.- Returns:
- the dateAndTimeOfPersonalization
-
getPersonalizationSystemSerialNumber
public String getPersonalizationSystemSerialNumber()
Returns the personalization system serial number.- Returns:
- the personalizationSystemSerialNumber
-
getTag
public int getTag()
Description copied from class:AbstractTaggedLDSFile
Returns the tag that identifies this LDS file.- Overrides:
getTag
in classAbstractTaggedLDSFile
- Returns:
- the tag of this LDS file
-
toString
public String toString()
Returns a textual representation of this file.
-
getEncoded
public byte[] getEncoded()
Returns the contents of this file as byte array, includes the ICAO tag and length.- Specified by:
getEncoded
in interfaceLDSElement
- Returns:
- a byte array containing the file
-
-