Class DG1File

    • 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 inputStream)
                throws IOException
        Creates a new file based on an input stream.
        Parameters:
        inputStream - an input stream
        Throws:
        IOException - if something goes wrong
    • 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
      • getMRZInfo

        public MRZInfo getMRZInfo()
        Returns the MRZ information stored in this file.
        Returns:
        the MRZ information
      • 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
      • writeContent

        protected void writeContent​(OutputStream out)
                             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:
        out - the output stream to write to
        Throws:
        IOException - on error writing to output stream
      • 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