public class DisplayedImageInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static int |
DISPLAYED_PORTRAIT_TAG |
protected static int |
DISPLAYED_SIGNATURE_OR_MARK_TAG |
JPEG_MIME_TYPE, JPEG2000_MIME_TYPE, TYPE_FINGER, TYPE_IRIS, TYPE_PORTRAIT, TYPE_SIGNATURE_OR_MARK, WSQ_MIME_TYPE
Constructor and Description |
---|
DisplayedImageInfo(java.io.InputStream in)
Constructs a displayed image info from binary encoding.
|
DisplayedImageInfo(int type,
byte[] imageBytes)
Constructs a displayed image info from the image bytes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
byte[] |
getEncoded()
Encodes this image info.
|
int |
getHeight()
Gets the height of the image.
|
java.io.InputStream |
getImageInputStream()
Gets the encoded image as an input stream.
|
int |
getImageLength()
Gets the length of the encoded image.
|
java.lang.String |
getMimeType()
Gets the mime-type of the encoded image.
|
long |
getRecordLength()
Gets the record length.
|
int |
getType()
Content type, one of
ImageInfo.TYPE_PORTRAIT ,
ImageInfo.TYPE_FINGER ,
ImageInfo.TYPE_IRIS ,
ImageInfo.TYPE_SIGNATURE_OR_MARK . |
int |
getWidth()
Gets the width of the image.
|
int |
hashCode() |
protected void |
readImage(java.io.InputStream inputStream,
long imageLength)
Clients should call this method after positioning the input stream to the
image bytes.
|
protected void |
readObject(java.io.InputStream inputStream)
Reads the displayed image.
|
protected void |
setHeight(int height) |
protected void |
setImageBytes(byte[] imageBytes) |
protected void |
setMimeType(java.lang.String mimeType) |
protected void |
setType(int type) |
protected void |
setWidth(int width) |
java.lang.String |
toString()
Gets a textual representation of this image info.
|
protected void |
writeImage(java.io.OutputStream outputStream) |
protected void |
writeObject(java.io.OutputStream outputStream) |
protected static final int DISPLAYED_PORTRAIT_TAG
protected static final int DISPLAYED_SIGNATURE_OR_MARK_TAG
public DisplayedImageInfo(int type, byte[] imageBytes)
type
- one of ImageInfo.TYPE_PORTRAIT
or ImageInfo.TYPE_SIGNATURE_OR_MARK
imageBytes
- encoded image, for Portrait and Signature or mark use JPEG encodingpublic DisplayedImageInfo(java.io.InputStream in) throws java.io.IOException
in
- an input streamjava.io.IOException
- if decoding failsprotected void readObject(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- the input stream positioned so that biometric data block tag and length are already readjava.io.IOException
- if reading failsprotected void writeObject(java.io.OutputStream outputStream) throws java.io.IOException
java.io.IOException
public long getRecordLength()
getRecordLength
in interface ImageInfo
public int getType()
ImageInfo.TYPE_PORTRAIT
,
ImageInfo.TYPE_FINGER
,
ImageInfo.TYPE_IRIS
,
ImageInfo.TYPE_SIGNATURE_OR_MARK
.public java.lang.String getMimeType()
getMimeType
in interface ImageInfo
public int getWidth()
public int getHeight()
public int getImageLength()
getImageLength
in interface ImageInfo
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public byte[] getEncoded()
getEncoded
in interface LDSElement
public java.io.InputStream getImageInputStream()
getImageInputStream
in interface ImageInfo
protected void readImage(java.io.InputStream inputStream, long imageLength) throws java.io.IOException
inputStream
- input streamimageLength
- image lengthjava.io.IOException
- on error reading the input streamprotected void writeImage(java.io.OutputStream outputStream) throws java.io.IOException
java.io.IOException
protected final void setMimeType(java.lang.String mimeType)
protected final void setType(int type)
protected final void setWidth(int width)
protected final void setHeight(int height)
protected final void setImageBytes(byte[] imageBytes)