Add to result the raw, but parsed, bytes of byte segments in 2D barcodes
[zxing.git] / core / src / com / google / zxing / datamatrix / decoder / Decoder.java
index 3280eb6..5ec86d2 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- * Copyright 2007 Google Inc.\r
+ * Copyright 2007 ZXing authors\r
  *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -18,6 +18,7 @@ package com.google.zxing.datamatrix.decoder;
 \r
 import com.google.zxing.ReaderException;\r
 import com.google.zxing.common.BitMatrix;\r
+import com.google.zxing.common.DecoderResult;\r
 import com.google.zxing.common.reedsolomon.GF256;\r
 import com.google.zxing.common.reedsolomon.ReedSolomonDecoder;\r
 import com.google.zxing.common.reedsolomon.ReedSolomonException;\r
@@ -41,10 +42,10 @@ public final class Decoder {
    * "true" is taken to mean a black module.</p>\r
    *\r
    * @param image booleans representing white/black Data Matrix Code modules\r
-   * @return text encoded within the Data Matrix Code\r
+   * @return text and bytes encoded within the Data Matrix Code\r
    * @throws ReaderException if the Data Matrix Code cannot be decoded\r
    */\r
-  public String decode(boolean[][] image) throws ReaderException {\r
+  public DecoderResult decode(boolean[][] image) throws ReaderException {\r
     int dimension = image.length;\r
     BitMatrix bits = new BitMatrix(dimension);\r
     for (int i = 0; i < dimension; i++) {\r
@@ -62,10 +63,10 @@ public final class Decoder {
    * to mean a black module.</p>\r
    *\r
    * @param bits booleans representing white/black Data Matrix Code modules\r
-   * @return text encoded within the Data Matrix Code\r
+   * @return text and bytes encoded within the Data Matrix Code\r
    * @throws ReaderException if the Data Matrix Code cannot be decoded\r
    */\r
-  public String decode(BitMatrix bits) throws ReaderException {\r
+  public DecoderResult decode(BitMatrix bits) throws ReaderException {\r
 \r
     // Construct a parser and read version, error-correction level\r
     BitMatrixParser parser = new BitMatrixParser(bits);\r