Remove use of methods not in J2ME

git-svn-id: https://zxing.googlecode.com/svn/trunk@1452 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2010-06-22 06:23:20 +00:00
parent 296bd49474
commit b3993e7d51
2 changed files with 9 additions and 9 deletions

View file

@ -50,7 +50,7 @@ final class BitArrayBuilder {
BitArray binary = new BitArray(size); BitArray binary = new BitArray(size);
int accPos = 0; int accPos = 0;
ExpandedPair firstPair = (ExpandedPair)pairs.get(0); ExpandedPair firstPair = (ExpandedPair) pairs.elementAt(0);
int firstValue = firstPair.getRightChar().getValue(); int firstValue = firstPair.getRightChar().getValue();
for(int i = 11; i >= 0; --i){ for(int i = 11; i >= 0; --i){
if ((firstValue & (1 << i)) != 0) { if ((firstValue & (1 << i)) != 0) {
@ -60,7 +60,7 @@ final class BitArrayBuilder {
} }
for(int i = 1; i < pairs.size(); ++i){ 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(); int leftValue = currentPair.getLeftChar().getValue();
for(int j = 11; j >= 0; --j){ for(int j = 11; j >= 0; --j){

View file

@ -126,7 +126,7 @@ public final class RSSExpandedReader extends AbstractRSSReader{
Vector decodeRow2pairs(int rowNumber, BitArray row) throws NotFoundException { Vector decodeRow2pairs(int rowNumber, BitArray row) throws NotFoundException {
while(true){ while(true){
ExpandedPair nextPair = retrieveNextPair(row, this.pairs, rowNumber); ExpandedPair nextPair = retrieveNextPair(row, this.pairs, rowNumber);
this.pairs.add(nextPair); this.pairs.addElement(nextPair);
if(nextPair.mayBeLast()){ if(nextPair.mayBeLast()){
if(checkChecksum()) { if(checkChecksum()) {
@ -145,7 +145,7 @@ public final class RSSExpandedReader extends AbstractRSSReader{
AbstractExpandedDecoder decoder = AbstractExpandedDecoder.createDecoder(binary); AbstractExpandedDecoder decoder = AbstractExpandedDecoder.createDecoder(binary);
String resultingString = decoder.parseInformation(); 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(); ResultPoint [] lastPoints = ((ExpandedPair)pairs.lastElement()).getFinderPattern().getResultPoints();
return new Result( return new Result(
@ -157,7 +157,7 @@ public final class RSSExpandedReader extends AbstractRSSReader{
} }
private boolean checkChecksum(){ private boolean checkChecksum(){
ExpandedPair firstPair = (ExpandedPair)this.pairs.get(0); ExpandedPair firstPair = (ExpandedPair)this.pairs.elementAt(0);
DataCharacter checkCharacter = firstPair.getLeftChar(); DataCharacter checkCharacter = firstPair.getLeftChar();
DataCharacter firstCharacter = firstPair.getRightChar(); DataCharacter firstCharacter = firstPair.getRightChar();
@ -165,7 +165,7 @@ public final class RSSExpandedReader extends AbstractRSSReader{
int S = 2; int S = 2;
for(int i = 1; i < this.pairs.size(); ++i){ 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(); checksum += currentPair.getLeftChar().getChecksumPortion();
S++; S++;
if(currentPair.getRightChar() != null){ if(currentPair.getRightChar() != null){
@ -239,7 +239,7 @@ public final class RSSExpandedReader extends AbstractRSSReader{
} }
for(int pos = 0; pos < previousPairs.size(); ++pos) { 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(); this.currentSequence[currentSequenceLength - 1] = pattern.getValue();