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​(java.io.InputStream in)
                           throws java.io.IOException
        Constructs a displayed image info from binary encoding.
        Parameters:
        in - an input stream
        Throws:
        java.io.IOException - if decoding fails
    • Method Detail

      • readObject

        protected void readObject​(java.io.InputStream inputStream)
                           throws java.io.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:
        java.io.IOException - if reading fails
      • writeObject

        protected void writeObject​(java.io.OutputStream outputStream)
                            throws java.io.IOException
        Description copied from class: AbstractImageInfo
        Writes this object to a stream.
        Specified by:
        writeObject in class AbstractImageInfo
        Parameters:
        outputStream - the stream to write to
        Throws:
        java.io.IOException - on error writing to the stream
      • getRecordLength

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