Package org.jmrtd.lds

Class DisplayedImageInfo

    • Field Detail

      • DISPLAYED_SIGNATURE_OR_MARK_TAG

        public static final int DISPLAYED_SIGNATURE_OR_MARK_TAG
        See Also:
        Constant Field Values
    • Constructor Detail

      • DisplayedImageInfo

        public DisplayedImageInfo​(int type,
                                  byte[] imageBytes)
        Constructs a displayed image info from the image bytes.
        Parameters:
        type - one of ImageInfo.TYPE_PORTRAIT or ImageInfo.TYPE_SIGNATURE_OR_MARK
        imageBytes - encoded image, for Portrait and Signature or mark use JPEG encoding
      • DisplayedImageInfo

        public DisplayedImageInfo​(InputStream in)
                           throws IOException
        Constructs a displayed image info from binary encoding.
        Parameters:
        in - an input stream
        Throws:
        IOException - if decoding fails
    • Method Detail

      • readObject

        protected void readObject​(InputStream inputStream)
                           throws IOException
        Reads the displayed image. This method should be implemented by concrete subclasses. The 5F2E or 7F2E tag and the length are already read.
        Specified by:
        readObject in class AbstractImageInfo
        Parameters:
        inputStream - the input stream positioned so that biometric data block tag and length are already read
        Throws:
        IOException - if reading fails
      • getRecordLength

        public long getRecordLength()
        Returns the record length of the encoded image info.
        Returns:
        the record length of the encoded image info