[SCM] Multi-format 1D/2D barcode image processing library branch, upstream, updated. 24d4480bc48cf9eabf7b2bd2f528248b0e458809
srowen
srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57
Wed Aug 4 01:32:21 UTC 2010
The following commit has been merged in the upstream branch:
commit d7b47ce88f1930ce4d47ea2964ce9bb6e3622d36
Author: srowen <srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Date: Tue Jun 22 06:23:20 2010 +0000
Remove use of methods not in J2ME
git-svn-id: http://zxing.googlecode.com/svn/trunk@1452 59b500cc-1b3d-0410-9834-0bbf25fbcc57
diff --git a/core/src/com/google/zxing/oned/rss/expanded/BitArrayBuilder.java b/core/src/com/google/zxing/oned/rss/expanded/BitArrayBuilder.java
index 0a78b8f..336046c 100644
--- a/core/src/com/google/zxing/oned/rss/expanded/BitArrayBuilder.java
+++ b/core/src/com/google/zxing/oned/rss/expanded/BitArrayBuilder.java
@@ -50,7 +50,7 @@ final class BitArrayBuilder {
BitArray binary = new BitArray(size);
int accPos = 0;
- ExpandedPair firstPair = (ExpandedPair)pairs.get(0);
+ ExpandedPair firstPair = (ExpandedPair) pairs.elementAt(0);
int firstValue = firstPair.getRightChar().getValue();
for(int i = 11; i >= 0; --i){
if ((firstValue & (1 << i)) != 0) {
@@ -60,7 +60,7 @@ final class BitArrayBuilder {
}
for(int i = 1; i < pairs.size(); ++i){
- ExpandedPair currentPair = (ExpandedPair)pairs.get(i);
+ ExpandedPair currentPair = (ExpandedPair) pairs.elementAt(i);
int leftValue = currentPair.getLeftChar().getValue();
for(int j = 11; j >= 0; --j){
diff --git a/core/src/com/google/zxing/oned/rss/expanded/RSSExpandedReader.java b/core/src/com/google/zxing/oned/rss/expanded/RSSExpandedReader.java
index d9c822a..6e6ddc6 100644
--- a/core/src/com/google/zxing/oned/rss/expanded/RSSExpandedReader.java
+++ b/core/src/com/google/zxing/oned/rss/expanded/RSSExpandedReader.java
@@ -126,7 +126,7 @@ public final class RSSExpandedReader extends AbstractRSSReader{
Vector decodeRow2pairs(int rowNumber, BitArray row) throws NotFoundException {
while(true){
ExpandedPair nextPair = retrieveNextPair(row, this.pairs, rowNumber);
- this.pairs.add(nextPair);
+ this.pairs.addElement(nextPair);
if(nextPair.mayBeLast()){
if(checkChecksum()) {
@@ -145,7 +145,7 @@ public final class RSSExpandedReader extends AbstractRSSReader{
AbstractExpandedDecoder decoder = AbstractExpandedDecoder.createDecoder(binary);
String resultingString = decoder.parseInformation();
- ResultPoint [] firstPoints = ((ExpandedPair)pairs.get(0)).getFinderPattern().getResultPoints();
+ ResultPoint [] firstPoints = ((ExpandedPair)pairs.elementAt(0)).getFinderPattern().getResultPoints();
ResultPoint [] lastPoints = ((ExpandedPair)pairs.lastElement()).getFinderPattern().getResultPoints();
return new Result(
@@ -157,7 +157,7 @@ public final class RSSExpandedReader extends AbstractRSSReader{
}
private boolean checkChecksum(){
- ExpandedPair firstPair = (ExpandedPair)this.pairs.get(0);
+ ExpandedPair firstPair = (ExpandedPair)this.pairs.elementAt(0);
DataCharacter checkCharacter = firstPair.getLeftChar();
DataCharacter firstCharacter = firstPair.getRightChar();
@@ -165,7 +165,7 @@ public final class RSSExpandedReader extends AbstractRSSReader{
int S = 2;
for(int i = 1; i < this.pairs.size(); ++i){
- ExpandedPair currentPair = (ExpandedPair)this.pairs.get(i);
+ ExpandedPair currentPair = (ExpandedPair)this.pairs.elementAt(i);
checksum += currentPair.getLeftChar().getChecksumPortion();
S++;
if(currentPair.getRightChar() != null){
@@ -208,9 +208,9 @@ public final class RSSExpandedReader extends AbstractRSSReader{
do{
this.findNextPair(row, previousPairs, forcedOffset);
pattern = parseFoundFinderPattern(row, rowNumber, isOddPattern);
- if(pattern == null){
+ if (pattern == null){
forcedOffset = getNextSecondBar(row, this.startEnd[0]);
- }else {
+ } else {
keepFinding = false;
}
}while(keepFinding);
@@ -239,7 +239,7 @@ public final class RSSExpandedReader extends AbstractRSSReader{
}
for(int pos = 0; pos < previousPairs.size(); ++pos) {
- this.currentSequence[pos] = ((ExpandedPair) previousPairs.get(pos)).getFinderPattern().getValue();
+ this.currentSequence[pos] = ((ExpandedPair) previousPairs.elementAt(pos)).getFinderPattern().getValue();
}
this.currentSequence[currentSequenceLength - 1] = pattern.getValue();
--
Multi-format 1D/2D barcode image processing library
More information about the Pkg-google-commits
mailing list