本文整理汇总了Java中com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder.createDecoder方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractExpandedDecoder.createDecoder方法的具体用法?Java AbstractExpandedDecoder.createDecoder怎么用?Java AbstractExpandedDecoder.createDecoder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder
的用法示例。
在下文中一共展示了AbstractExpandedDecoder.createDecoder方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: constructResult
import com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder; //导入方法依赖的package包/类
static Result constructResult(List<ExpandedPair> pairs) throws NotFoundException, FormatException {
BitArray binary = BitArrayBuilder.buildBitArray(pairs);
AbstractExpandedDecoder decoder = AbstractExpandedDecoder.createDecoder(binary);
String resultingString = decoder.parseInformation();
ResultPoint[] firstPoints = pairs.get(0).getFinderPattern().getResultPoints();
ResultPoint[] lastPoints = pairs.get(pairs.size() - 1).getFinderPattern().getResultPoints();
return new Result(
resultingString,
null,
new ResultPoint[]{firstPoints[0], firstPoints[1], lastPoints[0], lastPoints[1]},
BarcodeFormat.RSS_EXPANDED
);
}
示例2: constructResult
import com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder; //导入方法依赖的package包/类
private static Result constructResult(List<ExpandedPair> pairs) throws NotFoundException{
BitArray binary = BitArrayBuilder.buildBitArray(pairs);
AbstractExpandedDecoder decoder = AbstractExpandedDecoder.createDecoder(binary);
String resultingString = decoder.parseInformation();
ResultPoint[] firstPoints = pairs.get(0).getFinderPattern().getResultPoints();
ResultPoint[] lastPoints = pairs.get(pairs.size() - 1).getFinderPattern().getResultPoints();
return new Result(
resultingString,
null,
new ResultPoint[]{firstPoints[0], firstPoints[1], lastPoints[0], lastPoints[1]},
BarcodeFormat.RSS_EXPANDED
);
}
示例3: constructResult
import com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder; //导入方法依赖的package包/类
static Result constructResult(List<ExpandedPair> pairs) throws NotFoundException, FormatException {
BitArray binary = BitArrayBuilder.buildBitArray(pairs);
AbstractExpandedDecoder decoder = AbstractExpandedDecoder.createDecoder(binary);
String resultingString = decoder.parseInformation();
ResultPoint[] firstPoints = pairs.get(0).getFinderPattern().getResultPoints();
ResultPoint[] lastPoints = pairs.get(pairs.size() - 1).getFinderPattern().getResultPoints();
return new Result(
resultingString,
null,
new ResultPoint[]{firstPoints[0], firstPoints[1], lastPoints[0], lastPoints[1]},
BarcodeFormat.RSS_EXPANDED
);
}
示例4: constructResult
import com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder; //导入方法依赖的package包/类
static Result constructResult(List<ExpandedPair> pairs) throws NotFoundException {
BitArray binary = BitArrayBuilder.buildBitArray(pairs);
AbstractExpandedDecoder decoder = AbstractExpandedDecoder.createDecoder(binary);
String resultingString = decoder.parseInformation();
ResultPoint[] firstPoints = pairs.get(0).getFinderPattern().getResultPoints();
ResultPoint[] lastPoints = pairs.get(pairs.size() - 1).getFinderPattern().getResultPoints();
return new Result(
resultingString,
null,
new ResultPoint[]{firstPoints[0], firstPoints[1], lastPoints[0], lastPoints[1]},
BarcodeFormat.RSS_EXPANDED
);
}
示例5: constructResult
import com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder; //导入方法依赖的package包/类
static Result constructResult(List<ExpandedPair> pairs) throws NotFoundException{
BitArray binary = BitArrayBuilder.buildBitArray(pairs);
AbstractExpandedDecoder decoder = AbstractExpandedDecoder.createDecoder(binary);
String resultingString = decoder.parseInformation();
ResultPoint[] firstPoints = pairs.get(0).getFinderPattern().getResultPoints();
ResultPoint[] lastPoints = pairs.get(pairs.size() - 1).getFinderPattern().getResultPoints();
return new Result(
resultingString,
null,
new ResultPoint[]{firstPoints[0], firstPoints[1], lastPoints[0], lastPoints[1]},
BarcodeFormat.RSS_EXPANDED
);
}
示例6: constructResult
import com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder; //导入方法依赖的package包/类
private static Result constructResult(Vector pairs) throws NotFoundException{
BitArray binary = BitArrayBuilder.buildBitArray(pairs);
AbstractExpandedDecoder decoder = AbstractExpandedDecoder.createDecoder(binary);
String resultingString = decoder.parseInformation();
ResultPoint [] firstPoints = ((ExpandedPair)pairs.elementAt(0)).getFinderPattern().getResultPoints();
ResultPoint [] lastPoints = ((ExpandedPair)pairs.lastElement()).getFinderPattern().getResultPoints();
return new Result(
resultingString,
null,
new ResultPoint[]{firstPoints[0], firstPoints[1], lastPoints[0], lastPoints[1]},
BarcodeFormat.RSS_EXPANDED
);
}
示例7: testNoAi
import com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder; //导入方法依赖的package包/类
@Test
public void testNoAi() throws Exception {
BitArray information = BinaryUtil.buildBitArrayFromString(" .......X ..XX..X. X.X....X .......X ....");
AbstractExpandedDecoder decoder = AbstractExpandedDecoder.createDecoder(information);
String decoded = decoder.parseInformation();
assertEquals("(10)12A", decoded);
}