类com.google.zxing.oned.rss.expanded.RSSExpandedReader源码实例Demo

下面列出了怎么用com.google.zxing.oned.rss.expanded.RSSExpandedReader的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: ScreenCapture   文件: MultiFormatOneDReader.java
public MultiFormatOneDReader(Map<DecodeHintType,?> hints) {
  @SuppressWarnings("unchecked")
  Collection<BarcodeFormat> possibleFormats = hints == null ? null :
      (Collection<BarcodeFormat>) hints.get(DecodeHintType.POSSIBLE_FORMATS);
  boolean useCode39CheckDigit = hints != null &&
      hints.get(DecodeHintType.ASSUME_CODE_39_CHECK_DIGIT) != null;
  Collection<OneDReader> readers = new ArrayList<>();
  if (possibleFormats != null) {
    if (possibleFormats.contains(BarcodeFormat.EAN_13) ||
        possibleFormats.contains(BarcodeFormat.UPC_A) ||
        possibleFormats.contains(BarcodeFormat.EAN_8) ||
        possibleFormats.contains(BarcodeFormat.UPC_E)) {
      readers.add(new MultiFormatUPCEANReader(hints));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_39)) {
      readers.add(new Code39Reader(useCode39CheckDigit));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_93)) {
      readers.add(new Code93Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_128)) {
      readers.add(new Code128Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.ITF)) {
       readers.add(new ITFReader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODABAR)) {
       readers.add(new CodaBarReader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_14)) {
       readers.add(new RSS14Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_EXPANDED)) {
      readers.add(new RSSExpandedReader());
    }
  }
  if (readers.isEmpty()) {
    readers.add(new MultiFormatUPCEANReader(hints));
    readers.add(new Code39Reader());
    readers.add(new CodaBarReader());
    readers.add(new Code93Reader());
    readers.add(new Code128Reader());
    readers.add(new ITFReader());
    readers.add(new RSS14Reader());
    readers.add(new RSSExpandedReader());
  }
  this.readers = readers.toArray(new OneDReader[readers.size()]);
}
 
public MultiFormatOneDReader(Map<DecodeHintType,?> hints) {
  @SuppressWarnings("unchecked")
  Collection<BarcodeFormat> possibleFormats = hints == null ? null :
      (Collection<BarcodeFormat>) hints.get(DecodeHintType.POSSIBLE_FORMATS);
  boolean useCode39CheckDigit = hints != null &&
      hints.get(DecodeHintType.ASSUME_CODE_39_CHECK_DIGIT) != null;
  Collection<OneDReader> readers = new ArrayList<>();
  if (possibleFormats != null) {
    if (possibleFormats.contains(BarcodeFormat.EAN_13) ||
        possibleFormats.contains(BarcodeFormat.UPC_A) ||
        possibleFormats.contains(BarcodeFormat.EAN_8) ||
        possibleFormats.contains(BarcodeFormat.UPC_E)) {
      readers.add(new MultiFormatUPCEANReader(hints));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_39)) {
      readers.add(new Code39Reader(useCode39CheckDigit));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_93)) {
      readers.add(new Code93Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_128)) {
      readers.add(new Code128Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.ITF)) {
       readers.add(new ITFReader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODABAR)) {
       readers.add(new CodaBarReader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_14)) {
       readers.add(new RSS14Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_EXPANDED)) {
      readers.add(new RSSExpandedReader());
    }
  }
  if (readers.isEmpty()) {
    readers.add(new MultiFormatUPCEANReader(hints));
    readers.add(new Code39Reader());
    readers.add(new CodaBarReader());
    readers.add(new Code93Reader());
    readers.add(new Code128Reader());
    readers.add(new ITFReader());
    readers.add(new RSS14Reader());
    readers.add(new RSSExpandedReader());
  }
  this.readers = readers.toArray(new OneDReader[readers.size()]);
}
 
源代码3 项目: QrCodeScanner   文件: MultiFormatOneDReader.java
public MultiFormatOneDReader(Map<DecodeHintType,?> hints) {
  @SuppressWarnings("unchecked")
  Collection<BarcodeFormat> possibleFormats = hints == null ? null :
      (Collection<BarcodeFormat>) hints.get(DecodeHintType.POSSIBLE_FORMATS);
  boolean useCode39CheckDigit = hints != null &&
      hints.get(DecodeHintType.ASSUME_CODE_39_CHECK_DIGIT) != null;
  Collection<OneDReader> readers = new ArrayList<>();
  if (possibleFormats != null) {
    if (possibleFormats.contains(BarcodeFormat.EAN_13) ||
        possibleFormats.contains(BarcodeFormat.UPC_A) ||
        possibleFormats.contains(BarcodeFormat.EAN_8) ||
        possibleFormats.contains(BarcodeFormat.UPC_E)) {
      readers.add(new MultiFormatUPCEANReader(hints));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_39)) {
      readers.add(new Code39Reader(useCode39CheckDigit));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_93)) {
      readers.add(new Code93Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_128)) {
      readers.add(new Code128Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.ITF)) {
       readers.add(new ITFReader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODABAR)) {
       readers.add(new CodaBarReader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_14)) {
       readers.add(new RSS14Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_EXPANDED)) {
      readers.add(new RSSExpandedReader());
    }
  }
  if (readers.isEmpty()) {
    readers.add(new MultiFormatUPCEANReader(hints));
    readers.add(new Code39Reader());
    readers.add(new CodaBarReader());
    readers.add(new Code93Reader());
    readers.add(new Code128Reader());
    readers.add(new ITFReader());
    readers.add(new RSS14Reader());
    readers.add(new RSSExpandedReader());
  }
  this.readers = readers.toArray(new OneDReader[readers.size()]);
}
 
源代码4 项目: ZXing-Orient   文件: MultiFormatOneDReader.java
public MultiFormatOneDReader(Map<DecodeHintType,?> hints) {
  @SuppressWarnings("unchecked")    
  Collection<BarcodeFormat> possibleFormats = hints == null ? null :
      (Collection<BarcodeFormat>) hints.get(DecodeHintType.POSSIBLE_FORMATS);
  boolean useCode39CheckDigit = hints != null &&
      hints.get(DecodeHintType.ASSUME_CODE_39_CHECK_DIGIT) != null;
  Collection<OneDReader> readers = new ArrayList<>();
  if (possibleFormats != null) {
    if (possibleFormats.contains(BarcodeFormat.EAN_13) ||
        possibleFormats.contains(BarcodeFormat.UPC_A) ||
        possibleFormats.contains(BarcodeFormat.EAN_8) ||
        possibleFormats.contains(BarcodeFormat.UPC_E)) {
      readers.add(new MultiFormatUPCEANReader(hints));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_39)) {
      readers.add(new Code39Reader(useCode39CheckDigit));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_93)) {
      readers.add(new Code93Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_128)) {
      readers.add(new Code128Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.ITF)) {
       readers.add(new ITFReader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODABAR)) {
       readers.add(new CodaBarReader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_14)) {
       readers.add(new RSS14Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_EXPANDED)){
      readers.add(new RSSExpandedReader());
    }
  }
  if (readers.isEmpty()) {
    readers.add(new MultiFormatUPCEANReader(hints));
    readers.add(new Code39Reader());
    readers.add(new CodaBarReader());
    readers.add(new Code93Reader());
    readers.add(new Code128Reader());
    readers.add(new ITFReader());
    readers.add(new RSS14Reader());
    readers.add(new RSSExpandedReader());
  }
  this.readers = readers.toArray(new OneDReader[readers.size()]);
}
 
public MultiFormatOneDReader(Map<DecodeHintType,?> hints) {
  @SuppressWarnings("unchecked")    
  Collection<BarcodeFormat> possibleFormats = hints == null ? null :
      (Collection<BarcodeFormat>) hints.get(DecodeHintType.POSSIBLE_FORMATS);
  boolean useCode39CheckDigit = hints != null &&
      hints.get(DecodeHintType.ASSUME_CODE_39_CHECK_DIGIT) != null;
  Collection<OneDReader> readers = new ArrayList<>();
  if (possibleFormats != null) {
    if (possibleFormats.contains(BarcodeFormat.EAN_13) ||
        possibleFormats.contains(BarcodeFormat.UPC_A) ||
        possibleFormats.contains(BarcodeFormat.EAN_8) ||
        possibleFormats.contains(BarcodeFormat.UPC_E)) {
      readers.add(new MultiFormatUPCEANReader(hints));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_39)) {
      readers.add(new Code39Reader(useCode39CheckDigit));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_93)) {
      readers.add(new Code93Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_128)) {
      readers.add(new Code128Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.ITF)) {
       readers.add(new ITFReader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODABAR)) {
       readers.add(new CodaBarReader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_14)) {
       readers.add(new RSS14Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_EXPANDED)){
      readers.add(new RSSExpandedReader());
    }
  }
  if (readers.isEmpty()) {
    readers.add(new MultiFormatUPCEANReader(hints));
    readers.add(new Code39Reader());
    readers.add(new CodaBarReader());
    readers.add(new Code93Reader());
    readers.add(new Code128Reader());
    readers.add(new ITFReader());
    readers.add(new RSS14Reader());
    readers.add(new RSSExpandedReader());
  }
  this.readers = readers.toArray(new OneDReader[readers.size()]);
}
 
源代码6 项目: weex   文件: MultiFormatOneDReader.java
public MultiFormatOneDReader(Map<DecodeHintType,?> hints) {
  @SuppressWarnings("unchecked")    
  Collection<BarcodeFormat> possibleFormats = hints == null ? null :
      (Collection<BarcodeFormat>) hints.get(DecodeHintType.POSSIBLE_FORMATS);
  boolean useCode39CheckDigit = hints != null &&
      hints.get(DecodeHintType.ASSUME_CODE_39_CHECK_DIGIT) != null;
  Collection<OneDReader> readers = new ArrayList<>();
  if (possibleFormats != null) {
    if (possibleFormats.contains(BarcodeFormat.EAN_13) ||
        possibleFormats.contains(BarcodeFormat.UPC_A) ||
        possibleFormats.contains(BarcodeFormat.EAN_8) ||
        possibleFormats.contains(BarcodeFormat.UPC_E)) {
      readers.add(new MultiFormatUPCEANReader(hints));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_39)) {
      readers.add(new Code39Reader(useCode39CheckDigit));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_93)) {
      readers.add(new Code93Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_128)) {
      readers.add(new Code128Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.ITF)) {
       readers.add(new ITFReader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODABAR)) {
       readers.add(new CodaBarReader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_14)) {
       readers.add(new RSS14Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_EXPANDED)){
      readers.add(new RSSExpandedReader());
    }
  }
  if (readers.isEmpty()) {
    readers.add(new MultiFormatUPCEANReader(hints));
    readers.add(new Code39Reader());
    readers.add(new CodaBarReader());
    readers.add(new Code93Reader());
    readers.add(new Code128Reader());
    readers.add(new ITFReader());
    readers.add(new RSS14Reader());
    readers.add(new RSSExpandedReader());
  }
  this.readers = readers.toArray(new OneDReader[readers.size()]);
}
 
public MultiFormatOneDReader(Map<DecodeHintType,?> hints) {
  @SuppressWarnings("unchecked")    
  Collection<BarcodeFormat> possibleFormats = hints == null ? null :
      (Collection<BarcodeFormat>) hints.get(DecodeHintType.POSSIBLE_FORMATS);
  boolean useCode39CheckDigit = hints != null &&
      hints.get(DecodeHintType.ASSUME_CODE_39_CHECK_DIGIT) != null;
  Collection<OneDReader> readers = new ArrayList<>();
  if (possibleFormats != null) {
    if (possibleFormats.contains(BarcodeFormat.EAN_13) ||
        possibleFormats.contains(BarcodeFormat.UPC_A) ||
        possibleFormats.contains(BarcodeFormat.EAN_8) ||
        possibleFormats.contains(BarcodeFormat.UPC_E)) {
      readers.add(new MultiFormatUPCEANReader(hints));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_39)) {
      readers.add(new Code39Reader(useCode39CheckDigit));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_93)) {
      readers.add(new Code93Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_128)) {
      readers.add(new Code128Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.ITF)) {
       readers.add(new ITFReader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODABAR)) {
       readers.add(new CodaBarReader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_14)) {
       readers.add(new RSS14Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_EXPANDED)) {
      readers.add(new RSSExpandedReader());
    }
  }
  if (readers.isEmpty()) {
    readers.add(new MultiFormatUPCEANReader(hints));
    readers.add(new Code39Reader());
    readers.add(new CodaBarReader());
    readers.add(new Code93Reader());
    readers.add(new Code128Reader());
    readers.add(new ITFReader());
    readers.add(new RSS14Reader());
    readers.add(new RSSExpandedReader());
  }
  this.readers = readers.toArray(new OneDReader[readers.size()]);
}
 
源代码8 项目: reacteu-app   文件: MultiFormatOneDReader.java
public MultiFormatOneDReader(Map<DecodeHintType,?> hints) {
  Collection<BarcodeFormat> possibleFormats = hints == null ? null :
      (Collection<BarcodeFormat>) hints.get(DecodeHintType.POSSIBLE_FORMATS);
  boolean useCode39CheckDigit = hints != null &&
      hints.get(DecodeHintType.ASSUME_CODE_39_CHECK_DIGIT) != null;
  Collection<OneDReader> readers = new ArrayList<OneDReader>();
  if (possibleFormats != null) {
    if (possibleFormats.contains(BarcodeFormat.EAN_13) ||
        possibleFormats.contains(BarcodeFormat.UPC_A) ||
        possibleFormats.contains(BarcodeFormat.EAN_8) ||
        possibleFormats.contains(BarcodeFormat.UPC_E)) {
      readers.add(new MultiFormatUPCEANReader(hints));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_39)) {
      readers.add(new Code39Reader(useCode39CheckDigit));
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_93)) {
      readers.add(new Code93Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODE_128)) {
      readers.add(new Code128Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.ITF)) {
       readers.add(new ITFReader());
    }
    if (possibleFormats.contains(BarcodeFormat.CODABAR)) {
       readers.add(new CodaBarReader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_14)) {
       readers.add(new RSS14Reader());
    }
    if (possibleFormats.contains(BarcodeFormat.RSS_EXPANDED)){
      readers.add(new RSSExpandedReader());
    }
  }
  if (readers.isEmpty()) {
    readers.add(new MultiFormatUPCEANReader(hints));
    readers.add(new Code39Reader());
    readers.add(new CodaBarReader());
    readers.add(new Code93Reader());
    readers.add(new Code128Reader());
    readers.add(new ITFReader());
    readers.add(new RSS14Reader());
    readers.add(new RSSExpandedReader());
  }
  this.readers = readers.toArray(new OneDReader[readers.size()]);
}
 
源代码9 项目: OkapiBarcode   文件: SymbolTest.java
/**
 * Returns a ZXing reader that can read the specified symbol.
 *
 * @param symbol the symbol to be read
 * @return a ZXing reader that can read the specified symbol
 */
private static Reader findReader(Symbol symbol) {

    // TODO: see if we can massage data enough to check MaxiCode symbols against MaxiCodeReader instances

    if (symbol instanceof Code128 || symbol instanceof UspsPackage) {
        return new Code128Reader();
    } else if (symbol instanceof Code93) {
        return new Code93Reader();
    } else if (symbol instanceof Code3Of9) {
        return new Code39Reader();
    } else if (symbol instanceof Codabar) {
        return new CodaBarReader();
    } else if (symbol instanceof AztecCode &&
               symbol.getDataType() != DataType.GS1 &&
               symbol.getEciMode() == 3 &&
              !symbol.getReaderInit() &&
              !symbol.getContent().isEmpty()) {
        // ZXing does not currently support GS1 in Aztec Code symbols
        // ZXing does not currently support ECI in Aztec Code symbols
        // ZXing does not currently support reader initialization in Aztec Code symbols
        // ZXing cannot find symbols if they don't contain any actual data
        return new AztecReader();
    } else if (symbol instanceof QrCode) {
        return new QRCodeReader();
    } else if (symbol instanceof DataMatrix &&
               symbol.getEciMode() == 3 &&
               ((DataMatrix) symbol).getStructuredAppendTotal() == 1) {
        // ZXing does not currently support ECI in Data Matrix symbols
        // ZXing does not currently support Structured Append in Data Matrix symbols
        return new DataMatrixReader();
    } else if (symbol instanceof Ean) {
        Ean ean = (Ean) symbol;
        if (ean.getMode() == Ean.Mode.EAN8) {
            return new EAN8Reader();
        } else {
            return new EAN13Reader();
        }
    } else if (symbol instanceof Pdf417) {
        Pdf417 pdf417 = (Pdf417) symbol;
        if (pdf417.getMode() != Pdf417.Mode.MICRO) {
            return new PDF417Reader();
        }
    } else if (symbol instanceof Upc) {
        Upc upc = (Upc) symbol;
        if (upc.getMode() == Upc.Mode.UPCA) {
            return new UPCAReader();
        } else {
            return new UPCEReader();
        }
    } else if (symbol instanceof DataBarExpanded) {
        return new RSSExpandedReader();
    } else if (symbol instanceof DataBar14 && !((DataBar14) symbol).getLinkageFlag()) {
        return new RSS14Reader();
    }

    // no corresponding ZXing reader exists, or it behaves badly so we don't use it for testing
    return null;
}
 
 类所在包
 同包方法