76 lines
2.5 KiB
Java
76 lines
2.5 KiB
Java
|
package o;
|
||
|
|
||
|
import java.nio.charset.Charset;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.Collections;
|
||
|
import java.util.List;
|
||
|
import java.util.Random;
|
||
|
|
||
|
/* renamed from: o.gla, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes6.dex */
|
||
|
public final class C15246gla {
|
||
|
private static final char[] c = "-_1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
|
||
|
private gkT g;
|
||
|
EnumC15211gkU a = EnumC15211gkU.STRICT;
|
||
|
String d = null;
|
||
|
Charset e = null;
|
||
|
public List<gkV> b = null;
|
||
|
|
||
|
private static String c() {
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
Random random = new Random();
|
||
|
int nextInt = random.nextInt(11);
|
||
|
for (int i = 0; i < nextInt + 30; i++) {
|
||
|
char[] cArr = c;
|
||
|
sb.append(cArr[random.nextInt(cArr.length)]);
|
||
|
}
|
||
|
return sb.toString();
|
||
|
}
|
||
|
|
||
|
public final C15259gln b() {
|
||
|
AbstractC15213gkZ gky;
|
||
|
String c2 = c();
|
||
|
Charset charset = this.e;
|
||
|
ArrayList arrayList = new ArrayList(2);
|
||
|
arrayList.add(new C15261glp("boundary", c2));
|
||
|
if (charset != null) {
|
||
|
arrayList.add(new C15261glp("charset", charset.name()));
|
||
|
}
|
||
|
gkT b = gkT.b("multipart/form-data", (gkS[]) arrayList.toArray(new gkS[arrayList.size()]));
|
||
|
List arrayList2 = this.b != null ? new ArrayList(this.b) : Collections.emptyList();
|
||
|
EnumC15211gkU enumC15211gkU = this.a;
|
||
|
if (enumC15211gkU == null) {
|
||
|
enumC15211gkU = EnumC15211gkU.STRICT;
|
||
|
}
|
||
|
int i = AnonymousClass5.b[enumC15211gkU.ordinal()];
|
||
|
if (i == 1) {
|
||
|
gky = new gkY(charset, c2, arrayList2);
|
||
|
} else if (i == 2) {
|
||
|
gky = new C15250gle(charset, c2, arrayList2);
|
||
|
} else {
|
||
|
gky = new C15257gll(charset, c2, arrayList2);
|
||
|
}
|
||
|
return new C15259gln(gky, b, gky.a());
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* renamed from: o.gla$5, reason: invalid class name */
|
||
|
/* loaded from: classes6.dex */
|
||
|
public static /* synthetic */ class AnonymousClass5 {
|
||
|
static final int[] b;
|
||
|
|
||
|
static {
|
||
|
int[] iArr = new int[EnumC15211gkU.values().length];
|
||
|
b = iArr;
|
||
|
try {
|
||
|
iArr[EnumC15211gkU.BROWSER_COMPATIBLE.ordinal()] = 1;
|
||
|
} catch (NoSuchFieldError unused) {
|
||
|
}
|
||
|
try {
|
||
|
b[EnumC15211gkU.RFC6532.ordinal()] = 2;
|
||
|
} catch (NoSuchFieldError unused2) {
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|