# Print output for @column tags ?> ScanResult2 | Android Developers

Most visited

Recently visited

ScanResult2

public class ScanResult2
extends Object implements Parcelable

java.lang.Object
   ↳ com.vuzix.sdk.barcode.ScanResult2


Represents a single barcode located within an image.

Summary

Fields

public static final Creator<ScanResult2> CREATOR

Public constructors

ScanResult2(String text, byte[] rawBytes, Point[] resultPoints, BarcodeType2 format)

Constructs a result from the data found within the image frame

ScanResult2(String text, byte[] rawBytes, Point[] resultPoints, BarcodeType2 format, long timestamp)

Constructs a result from the data found within the image frame

Public methods

void addResultPoints(Point[] newPoints)

Adds details of the barcode location points to the results

int describeContents()
BarcodeType2 getBarcodeFormat()
byte[] getRawBytes()
Point[] getResultPoints()
String getText()
long getTimestamp()

Get the timestamp when the barcode was detected

String toString()
void writeToParcel(Parcel out, int flags)

Fields

CREATOR

public static final Creator<ScanResult2> CREATOR

Public constructors

ScanResult2

public ScanResult2 (String text, 
                byte[] rawBytes, 
                Point[] resultPoints, 
                BarcodeType2 format)

Constructs a result from the data found within the image frame

Parameters
text String: String representation of the scanned barcode data

rawBytes byte: byte[] representation of the scanned barcode data

resultPoints Point: Point[] data for the corners of the barcode within the image frame

format BarcodeType2: BarcodeType2 format of the scanned barcoded data

ScanResult2

public ScanResult2 (String text, 
                byte[] rawBytes, 
                Point[] resultPoints, 
                BarcodeType2 format, 
                long timestamp)

Constructs a result from the data found within the image frame

Parameters
text String: String representation of the scanned barcode data

rawBytes byte: byte[] representation of the scanned barcode data

resultPoints Point: Point[] data for the corners of the barcode within the image frame

format BarcodeType2: BarcodeType2 format of the scanned barcoded data

timestamp long: Timestamp of when the scan was detected

Public methods

addResultPoints

public void addResultPoints (Point[] newPoints)

Adds details of the barcode location points to the results

Parameters
newPoints Point: Point[] information of corners

describeContents

public int describeContents ()

Returns
int

getBarcodeFormat

public BarcodeType2 getBarcodeFormat ()

Returns
BarcodeType2 BarcodeType2 representing the format of the barcode that was decoded

getRawBytes

public byte[] getRawBytes ()

Returns
byte[] raw bytes encoded by the barcode, if applicable, otherwise null

getResultPoints

public Point[] getResultPoints ()

Returns
Point[] Point[] array related to the barcode in the image. These are typically points identifying finder patterns or the corners of the barcode. The exact meaning is specific to the type of barcode that was decoded.

getText

public String getText ()

Returns
String text encoded by the barcode

getTimestamp

public long getTimestamp ()

Get the timestamp when the barcode was detected

Returns
long long epoch timestamp

toString

public String toString ()

Returns
String

writeToParcel

public void writeToParcel (Parcel out, 
                int flags)

Parameters
out Parcel

flags int