public class Result
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Result |
createScanResult(java.util.Map<java.lang.String,java.lang.Object> jsonImageObject)
Creates ScanResultImageItem if the jsonImageObject is not null.
|
static Result |
fromJson(java.lang.String resultJson)
Creates Result if the resultJson is not null.
|
java.util.List<java.lang.String> |
getBarcodes() |
java.lang.String |
getDevice()
The source device from which images are acquired.
|
java.awt.image.BufferedImage |
getImage(int index)
Gets the original image of the given index by searching the output in order: Imaging.OUTPUT_RETURN_BASE64, Imaging.OUTPUT_SAVE
This is a shortcut method, use getOutputItems() if you need more control.
|
int |
getImageCount()
Total number of images acquired.
|
java.util.List<java.io.File> |
getImageFiles()
Gets the list of image files acquired through Imaging.OUTPUT_SAVE
The
|
java.util.List<ResultImageItem> |
getImageItems()
Lists of images acquired.
|
java.util.List<java.awt.image.BufferedImage> |
getImages()
Returns all scanned images.
|
java.lang.String |
getInfo() |
int |
getLastTransferResultCode()
Last transfer result code, e.g., TwainConstants.TWRC_SUCCESS.
|
ResultOutputItem |
getOutputItem(java.lang.String outputType)
Finds the first output item of the given type.
|
java.util.List<ResultOutputItem> |
getOutputItems()
List of all output items.
|
java.util.List<ResultOutputItem> |
getOutputItems(java.lang.String outputType)
Finds the all output items of the given type.
|
java.io.File |
getPdfFile()
Gets the PDF file acquired through Imaging.OUTPUT_SAVE.
|
java.lang.Object |
getRequestData() |
java.lang.String |
getRequestId() |
java.lang.String |
getResponseId() |
java.awt.image.BufferedImage |
getThumbnail(int index)
Gets the thumbnail image of the given index by searching the output in order: Imaging.OUTPUT_RETURN_BASE64_THUMB, Imaging.OUTPUT_SAVE_THUMB
This is a shortcut method, use getOutputItems() if you need more control.
|
java.util.List<java.io.File> |
getThumbnailFiles()
Gets the list of image files acquired through Imaging.OUTPUT_SAVE_THUMB
|
java.lang.String |
getThumbnailUploadResponse()
Returns the thumbnail upload response if available.
|
java.io.File |
getTiffFile()
Gets the TIFF file acquired through Imaging.OUTPUT_SAVE.
|
java.lang.String |
getUploadResponse()
Returns the upload response if available.
|
boolean |
isUserCancelled()
Whether user pressed 'Cancel'.
|
void |
setDevice(java.lang.String device) |
void |
setImageCount(int imageCount) |
void |
setInfo(java.lang.String info) |
void |
setLastTransferResultCode(int lastTransferResultCode) |
void |
setRequestData(java.lang.Object requestData) |
void |
setRequestId(java.lang.String requestId) |
void |
setResponseId(java.lang.String responseId) |
java.lang.String |
toJson(boolean pretty) |
java.util.Map<java.lang.String,java.lang.Object> |
toJsonObject() |
java.lang.String |
toString() |
public java.util.Map<java.lang.String,java.lang.Object> toJsonObject()
public java.lang.String toJson(boolean pretty)
public static Result fromJson(java.lang.String resultJson) throws java.io.IOException
resultJson
- the stringjava.io.IOException
public static Result createScanResult(java.util.Map<java.lang.String,java.lang.Object> jsonImageObject)
jsonImageObject
- public java.lang.String getInfo()
public void setInfo(java.lang.String info)
public java.lang.String getDevice()
public void setDevice(java.lang.String device)
public int getImageCount()
public void setImageCount(int imageCount)
public int getLastTransferResultCode()
public void setLastTransferResultCode(int lastTransferResultCode)
public boolean isUserCancelled()
public java.lang.String getRequestId()
public void setRequestId(java.lang.String requestId)
public java.lang.Object getRequestData()
public void setRequestData(java.lang.Object requestData)
public java.lang.String getResponseId()
public void setResponseId(java.lang.String responseId)
public java.util.List<ResultImageItem> getImageItems()
public java.util.List<ResultOutputItem> getOutputItems()
public ResultOutputItem getOutputItem(java.lang.String outputType)
outputType
- any of Imaging.OUTPUT_SAVE ...public java.util.List<ResultOutputItem> getOutputItems(java.lang.String outputType)
outputType
- any of Imaging.OUTPUT_SAVE ...public java.util.List<java.io.File> getImageFiles()
public java.util.List<java.io.File> getThumbnailFiles()
public java.io.File getPdfFile()
public java.io.File getTiffFile()
public java.awt.image.BufferedImage getImage(int index)
index
- java.lang.IndexOutOfBoundsException
- if index is invalidTwainException
- if failed to load.public java.util.List<java.awt.image.BufferedImage> getImages()
public java.awt.image.BufferedImage getThumbnail(int index)
index
- java.lang.IndexOutOfBoundsException
- if index is invalidTwainException
- if failed to load.public java.lang.String getUploadResponse()
public java.lang.String getThumbnailUploadResponse()
public java.util.List<java.lang.String> getBarcodes()
public java.lang.String toString()
toString
in class java.lang.Object
v12.0.5.0 | Copyright © Asprise Software. All Rights Reserved. Please visit the product page at asprise.com