Class DG12File

    • 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 authority
        dateOfIssue - the date of issue
        namesOfOtherPersons - names of other persons
        endorsementsAndObservations - endorsements and observations
        taxOrExitRequirements - tax or exit requirements
        imageOfFront - image of front
        imageOfRear - image of rear
        dateAndTimeOfPersonalization - date and time of personalization
        personalizationSystemSerialNumber - 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 authority
        dateOfIssue - the date of issue
        namesOfOtherPersons - names of other persons
        endorsementsAndObservations - endorsements and observations
        taxOrExitRequirements - tax or exit requirements
        imageOfFront - image of front
        imageOfRear - image of rear
        dateAndTimeOfPersonalization - date and time of personalization
        personalizationSystemSerialNumber - 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 class AbstractTaggedLDSFile
        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 class AbstractTaggedLDSFile
        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
      • toString

        public String toString()
        Returns a textual representation of this file.
        Overrides:
        toString in class DataGroup
        Returns:
        a textual representation of this file
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getEncoded

        public byte[] getEncoded()
        Returns the contents of this file as byte array, includes the ICAO tag and length.
        Specified by:
        getEncoded in interface LDSElement
        Returns:
        a byte array containing the file