package com.facetec.sdk; import com.google.common.net.HttpHeaders; /* loaded from: classes.dex */ public final class le { static { mt.c("\"\\"); mt.c("\t ,="); } public static long b(kh khVar) { return d(khVar.d().e(HttpHeaders.CONTENT_LENGTH)); } private static long d(String str) { if (str == null) { return -1L; } try { return Long.parseLong(str); } catch (NumberFormatException unused) { return -1L; } } public static void c(js jsVar, kc kcVar, jv jvVar) { if (jsVar == js.e) { return; } jq.a(kcVar, jvVar).isEmpty(); } public static boolean d(kh khVar) { if (khVar.a().c().equals("HEAD")) { return false; } int e = khVar.e(); return (((e >= 100 && e < 200) || e == 204 || e == 304) && b(khVar) == -1 && !"chunked".equalsIgnoreCase(khVar.b(HttpHeaders.TRANSFER_ENCODING))) ? false : true; } public static int e(String str, int i, String str2) { while (i < str.length() && str2.indexOf(str.charAt(i)) == -1) { i++; } return i; } public static int d(String str, int i) { char charAt; while (i < str.length() && ((charAt = str.charAt(i)) == ' ' || charAt == '\t')) { i++; } return i; } public static int e(String str, int i) { try { long parseLong = Long.parseLong(str); if (parseLong > 2147483647L) { return Integer.MAX_VALUE; } if (parseLong < 0) { return 0; } return (int) parseLong; } catch (NumberFormatException unused) { return i; } } }