X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=core%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Fdatamatrix%2Fdecoder%2FDecoder.java;h=5ec86d286be092568dcb521bc08302d59cbfc1d5;hb=67bb87dea0eb848f80814f0353196079023a7aaf;hp=3280eb62ebf8d07f2ce87668e4d2c09c1633b946;hpb=0ee5f7050379e4edac731b8bc15ff68b6e03949c;p=zxing.git diff --git a/core/src/com/google/zxing/datamatrix/decoder/Decoder.java b/core/src/com/google/zxing/datamatrix/decoder/Decoder.java index 3280eb62..5ec86d28 100644 --- a/core/src/com/google/zxing/datamatrix/decoder/Decoder.java +++ b/core/src/com/google/zxing/datamatrix/decoder/Decoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2007 Google Inc. + * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package com.google.zxing.datamatrix.decoder; import com.google.zxing.ReaderException; import com.google.zxing.common.BitMatrix; +import com.google.zxing.common.DecoderResult; import com.google.zxing.common.reedsolomon.GF256; import com.google.zxing.common.reedsolomon.ReedSolomonDecoder; import com.google.zxing.common.reedsolomon.ReedSolomonException; @@ -41,10 +42,10 @@ public final class Decoder { * "true" is taken to mean a black module.

* * @param image booleans representing white/black Data Matrix Code modules - * @return text encoded within the Data Matrix Code + * @return text and bytes encoded within the Data Matrix Code * @throws ReaderException if the Data Matrix Code cannot be decoded */ - public String decode(boolean[][] image) throws ReaderException { + public DecoderResult decode(boolean[][] image) throws ReaderException { int dimension = image.length; BitMatrix bits = new BitMatrix(dimension); for (int i = 0; i < dimension; i++) { @@ -62,10 +63,10 @@ public final class Decoder { * to mean a black module.

* * @param bits booleans representing white/black Data Matrix Code modules - * @return text encoded within the Data Matrix Code + * @return text and bytes encoded within the Data Matrix Code * @throws ReaderException if the Data Matrix Code cannot be decoded */ - public String decode(BitMatrix bits) throws ReaderException { + public DecoderResult decode(BitMatrix bits) throws ReaderException { // Construct a parser and read version, error-correction level BitMatrixParser parser = new BitMatrixParser(bits);