Kofax Mobile SDK API Reference
Public Member Functions | List of all members
BarCodeResult Class Reference

A single bar code found data item. This object is serializable. More...

Inheritance diagram for BarCodeResult:

Public Member Functions

 BarCodeResult ()
 Constructs a new BarCodeResult instance. More...
 
BarCodeType getType ()
 Gets the result type of the barcode. More...
 
void setType (BarCodeType type)
 Sets the result type of the barcode. More...
 
BoundingTetragon getBoundingBox ()
 Gets the bounding tetragon of the barcode. More...
 
void setBoundingBox (BoundingTetragon bound)
 Sets the bounding tetragon of the barcode. More...
 
String getValue ()
 Gets the decoded barcode data. More...
 
void setValue (String value)
 Sets the decoded barcode data. More...
 
BarCodeDirection getDirection ()
 Gets the direction of the barcode. More...
 
void setDirection (BarCodeDirection direction)
 Sets the direction of the barcode. More...
 
BarCodeDataFormat getDataFormat ()
 Gets the encoding of the decoded barcode value. More...
 
void setDataFormat (BarCodeDataFormat format)
 Sets the encoding of the decoded barcode value. More...
 

Detailed Description

A single bar code found data item. This object is serializable.

Each instances contains one possible bar code result from a barcode reader. The result includes the type of barcode found, the location within the image where the barcode was found, and the actual value read.

BarCodeResult objects support serialization in a similar way to Image objects. The Image object documentation provides code examples for serialization and deserialization.

Constructor & Destructor Documentation

Constructs a new BarCodeResult instance.

Member Function Documentation

BoundingTetragon getBoundingBox ( )

Gets the bounding tetragon of the barcode.

The bounding tetragon is the area where the barcode reader found the barcode within the input image. A tetragon is used instead of a simple rectangle because the barcode may be skewed in the original image.

A valid bounding box is not guaranteed to be provided with a barcode result. This depends on the SDK object that was used to provide the result, and can further depend on the symbology matched and the parameters used to find the match. If there is no valid bounding box, this method will return null instead.

In particular, results returned from the BarcodeCaptureView only include bounding boxes for the 2D symbologies and PDF417.

Returns
A bounding tetragon.
BarCodeDataFormat getDataFormat ( )

Gets the encoding of the decoded barcode value.

Specifies whether the string returned by getValue() is encoded as ASCII or base64. Barcode data may be encoded as base64 if it contains non-printable characters.

Returns
The encoding type of the barcode data.
BarCodeDirection getDirection ( )

Gets the direction of the barcode.

This value indicates the orientation of the barcode that was found within the source image.

Returns
The direction of the barcode relative to the orientation of the source image.
BarCodeType getType ( )

Gets the result type of the barcode.

Returns
The type (symbology) of a barcode result, such as PDF417 or Code39.
String getValue ( )

Gets the decoded barcode data.

Returns the actual barcode data decoded by the reader. The data may be encoded in either base64 or plain ASCII, depending on whether the decoded data contained non-printable characters.

Returns
decoded data as an ASCII or base64-encoded string.
See also
getDataFormat()
void setBoundingBox ( BoundingTetragon  bound)

Sets the bounding tetragon of the barcode.

void setDataFormat ( BarCodeDataFormat  format)

Sets the encoding of the decoded barcode value.

void setDirection ( BarCodeDirection  direction)

Sets the direction of the barcode.

void setType ( BarCodeType  type)

Sets the result type of the barcode.

void setValue ( String  value)

Sets the decoded barcode data.


The documentation for this class was generated from the following file:
Untitled Document © 2018 Kofax, Inc. All rights reserved. Use is subject to license terms.