Package org.jmrtd.lds

Class DisplayedImageDataGroup

    • Constructor Detail

      • DisplayedImageDataGroup

        public DisplayedImageDataGroup​(int dataGroupTag,
                                       List<DisplayedImageInfo> imageInfos,
                                       int displayedImageTagToUse)
        Constructs a displayed image data group from a list of displayed images. The list should not be null or contain null valued displayed images.
        Parameters:
        dataGroupTag - a tag indicating DG5, DG6, or DG7
        imageInfos - a list of displayed images
        displayedImageTagToUse - a tag indicating Portrait or Signature or mark
      • DisplayedImageDataGroup

        public DisplayedImageDataGroup​(int dataGroupTag,
                                       InputStream inputStream)
                                throws IOException
        Constructs a displayed image data group from binary representation.
        Parameters:
        dataGroupTag - a tag indicating DG5, DG6, or DG7
        inputStream - an input stream
        Throws:
        IOException - on error reading the 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
      • toString

        public String toString()
        Description copied from class: DataGroup
        Gets 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