mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
25 lines
993 B
Java
25 lines
993 B
Java
package com.google.zxing.oned;
|
|
|
|
import com.google.zxing.BarcodeFormat;
|
|
import com.google.zxing.EncodeHintType;
|
|
import com.google.zxing.Writer;
|
|
import com.google.zxing.common.BitMatrix;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class UPCAWriter implements Writer {
|
|
private final EAN13Writer subWriter = new EAN13Writer();
|
|
|
|
@Override // com.google.zxing.Writer
|
|
public BitMatrix encode(String str, BarcodeFormat barcodeFormat, int i, int i2) {
|
|
return encode(str, barcodeFormat, i, i2, null);
|
|
}
|
|
|
|
@Override // com.google.zxing.Writer
|
|
public BitMatrix encode(String str, BarcodeFormat barcodeFormat, int i, int i2, Map<EncodeHintType, ?> map) {
|
|
if (barcodeFormat != BarcodeFormat.UPC_A) {
|
|
throw new IllegalArgumentException("Can only encode UPC-A, but got ".concat(String.valueOf(barcodeFormat)));
|
|
}
|
|
return this.subWriter.encode("0".concat(String.valueOf(str)), BarcodeFormat.EAN_13, i, i2, map);
|
|
}
|
|
}
|