mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
move all Result to RXingResult
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
package com.google.zxing.maxicode.decoder;
|
||||
|
||||
import com.google.zxing.FormatException;
|
||||
import com.google.zxing.common.DecoderResult;
|
||||
import com.google.zxing.common.DecoderRXingResult;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.NumberFormat;
|
||||
|
||||
@@ -84,7 +84,7 @@ final class DecodedBitStreamParser {
|
||||
private DecodedBitStreamParser() {
|
||||
}
|
||||
|
||||
static DecoderResult decode(byte[] bytes, int mode) throws FormatException {
|
||||
static DecoderRXingResult decode(byte[] bytes, int mode) throws FormatException {
|
||||
StringBuilder result = new StringBuilder(144);
|
||||
switch (mode) {
|
||||
case 2:
|
||||
@@ -118,7 +118,7 @@ final class DecodedBitStreamParser {
|
||||
result.append(getMessage(bytes, 1, 77));
|
||||
break;
|
||||
}
|
||||
return new DecoderResult(bytes, result.toString(), null, String.valueOf(mode));
|
||||
return new DecoderRXingResult(bytes, result.toString(), null, String.valueOf(mode));
|
||||
}
|
||||
|
||||
private static int getBit(int bit, byte[] bytes) {
|
||||
|
||||
@@ -20,7 +20,7 @@ import com.google.zxing.ChecksumException;
|
||||
import com.google.zxing.DecodeHintType;
|
||||
import com.google.zxing.FormatException;
|
||||
import com.google.zxing.common.BitMatrix;
|
||||
import com.google.zxing.common.DecoderResult;
|
||||
import com.google.zxing.common.DecoderRXingResult;
|
||||
import com.google.zxing.common.reedsolomon.GenericGF;
|
||||
import com.google.zxing.common.reedsolomon.ReedSolomonDecoder;
|
||||
import com.google.zxing.common.reedsolomon.ReedSolomonException;
|
||||
@@ -45,11 +45,11 @@ public final class Decoder {
|
||||
rsDecoder = new ReedSolomonDecoder(GenericGF.MAXICODE_FIELD_64);
|
||||
}
|
||||
|
||||
public DecoderResult decode(BitMatrix bits) throws ChecksumException, FormatException {
|
||||
public DecoderRXingResult decode(BitMatrix bits) throws ChecksumException, FormatException {
|
||||
return decode(bits, null);
|
||||
}
|
||||
|
||||
public DecoderResult decode(BitMatrix bits,
|
||||
public DecoderRXingResult decode(BitMatrix bits,
|
||||
Map<DecodeHintType,?> hints) throws FormatException, ChecksumException {
|
||||
BitMatrixParser parser = new BitMatrixParser(bits);
|
||||
byte[] codewords = parser.readCodewords();
|
||||
|
||||
Reference in New Issue
Block a user