X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=core%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2FResult.java;h=b9d0f5a03a4fa1a3803f0583c254607d654c2085;hb=f3880260808aac8cb22f216ec8e5c00e391e13e6;hp=42f194714556ad9fb35d46e15b6d8f626eb9858a;hpb=324c4749d7fc3e6823d48921ef3e7ae81ca9cd0f;p=zxing.git
diff --git a/core/src/com/google/zxing/Result.java b/core/src/com/google/zxing/Result.java
index 42f19471..b9d0f5a0 100644
--- a/core/src/com/google/zxing/Result.java
+++ b/core/src/com/google/zxing/Result.java
@@ -24,20 +24,31 @@ package com.google.zxing;
public final class Result {
private final String text;
+ private final byte[] rawBytes;
private final ResultPoint[] resultPoints;
+ private final BarcodeFormat format;
- public Result(String text, ResultPoint[] resultPoints) {
+ public Result(String text, byte[] rawBytes, ResultPoint[] resultPoints, BarcodeFormat format) {
this.text = text;
+ this.rawBytes = rawBytes;
this.resultPoints = resultPoints;
+ this.format = format;
}
/**
- * @return raw text encoded by the barcode, if any
+ * @return raw text encoded by the barcode, if applicable, otherwise null
*/
public String getText() {
return text;
}
+ /**
+ * @return raw bytes encoded by the barcode, if applicable, otherwise null
+ */
+ public byte[] getRawBytes() {
+ return rawBytes;
+ }
+
/**
* @return 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
@@ -47,4 +58,11 @@ public final class Result {
return resultPoints;
}
+ /**
+ * @return {@link BarcodeFormat} representing the format of the barcode that was recognized and decoded
+ */
+ public BarcodeFormat getBarcodeFormat() {
+ return format;
+ }
+
}