Initial commit
This commit is contained in:
22
sources/com/google/zxing/client/result/ISBNResultParser.java
Normal file
22
sources/com/google/zxing/client/result/ISBNResultParser.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package com.google.zxing.client.result;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
import com.google.zxing.Result;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class ISBNResultParser extends ResultParser {
|
||||
@Override // com.google.zxing.client.result.ResultParser
|
||||
public ISBNParsedResult a(Result result) {
|
||||
if (result.a() != BarcodeFormat.EAN_13) {
|
||||
return null;
|
||||
}
|
||||
String b = ResultParser.b(result);
|
||||
if (b.length() != 13) {
|
||||
return null;
|
||||
}
|
||||
if (b.startsWith("978") || b.startsWith("979")) {
|
||||
return new ISBNParsedResult(b);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user