public final class Result extends Object
Encapsulates the result of decoding a barcode within an image.
Constructor and Description |
---|
Result(String text,
byte[] rawBytes,
int numBits,
ResultPoint[] resultPoints,
BarcodeFormat format,
long timestamp) |
Result(String text,
byte[] rawBytes,
ResultPoint[] resultPoints,
BarcodeFormat format) |
Result(String text,
byte[] rawBytes,
ResultPoint[] resultPoints,
BarcodeFormat format,
long timestamp) |
Modifier and Type | Method and Description |
---|---|
void |
addResultPoints(ResultPoint[] newPoints) |
BarcodeFormat |
getBarcodeFormat() |
int |
getNumBits() |
byte[] |
getRawBytes() |
Map<ResultMetadataType,Object> |
getResultMetadata() |
ResultPoint[] |
getResultPoints() |
String |
getText() |
long |
getTimestamp() |
void |
putAllMetadata(Map<ResultMetadataType,Object> metadata) |
void |
putMetadata(ResultMetadataType type,
Object value) |
String |
toString() |
public Result(String text, byte[] rawBytes, ResultPoint[] resultPoints, BarcodeFormat format)
public Result(String text, byte[] rawBytes, ResultPoint[] resultPoints, BarcodeFormat format, long timestamp)
public Result(String text, byte[] rawBytes, int numBits, ResultPoint[] resultPoints, BarcodeFormat format, long timestamp)
public String getText()
public byte[] getRawBytes()
null
public int getNumBits()
getRawBytes()
are valid; typically 8 times its lengthpublic ResultPoint[] getResultPoints()
public BarcodeFormat getBarcodeFormat()
BarcodeFormat
representing the format of the barcode that was decodedpublic Map<ResultMetadataType,Object> getResultMetadata()
Map
mapping ResultMetadataType
keys to values. May be
null
. This contains optional metadata about what was detected about the barcode,
like orientation.public void putMetadata(ResultMetadataType type, Object value)
public void putAllMetadata(Map<ResultMetadataType,Object> metadata)
public void addResultPoints(ResultPoint[] newPoints)
public long getTimestamp()
Copyright © 2007–2022. All rights reserved.