Package com.google.zxing
Class Result
java.lang.Object
com.google.zxing.Result
Encapsulates the result of decoding a barcode within an image.
- Author:
- Sean Owen
-
Constructor Summary
ConstructorsConstructorDescriptionResult(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) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResultPoints(ResultPoint[] newPoints) intbyte[]getText()longvoidputAllMetadata(Map<ResultMetadataType, Object> metadata) voidputMetadata(ResultMetadataType type, Object value) toString()
-
Constructor Details
-
Result
-
Result
public Result(String text, byte[] rawBytes, ResultPoint[] resultPoints, BarcodeFormat format, long timestamp) -
Result
public Result(String text, byte[] rawBytes, int numBits, ResultPoint[] resultPoints, BarcodeFormat format, long timestamp)
-
-
Method Details
-
getText
- Returns:
- raw text encoded by the barcode
-
getRawBytes
public byte[] getRawBytes()- Returns:
- raw bytes encoded by the barcode, if applicable, otherwise
null
-
getNumBits
public int getNumBits()- Returns:
- how many bits of
getRawBytes()are valid; typically 8 times its length - Since:
- 3.3.0
-
getResultPoints
- Returns:
- points 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.
-
getBarcodeFormat
- Returns:
BarcodeFormatrepresenting the format of the barcode that was decoded
-
getResultMetadata
- Returns:
MapmappingResultMetadataTypekeys to values. May benull. This contains optional metadata about what was detected about the barcode, like orientation.
-
putMetadata
-
putAllMetadata
-
addResultPoints
-
getTimestamp
public long getTimestamp() -
toString
-