341 lines
10 KiB
Java
341 lines
10 KiB
Java
package o;
|
|
|
|
import java.io.EOFException;
|
|
import java.io.IOException;
|
|
import java.io.ObjectInputStream;
|
|
import java.io.ObjectOutputStream;
|
|
import java.io.Serializable;
|
|
import java.lang.reflect.Field;
|
|
import java.security.MessageDigest;
|
|
import java.util.Arrays;
|
|
|
|
/* renamed from: o.gij, reason: case insensitive filesystem */
|
|
/* loaded from: classes.dex */
|
|
public class C15155gij implements Serializable, Comparable<C15155gij> {
|
|
public static final LWm c = new LWm(0);
|
|
public static final C15155gij e = new C15155gij(new byte[0]);
|
|
private transient int a;
|
|
public final byte[] b;
|
|
public transient String d;
|
|
|
|
public C15155gij(byte[] bArr) {
|
|
C14957gcv.e(bArr, "");
|
|
this.b = bArr;
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:10:0x0030 A[RETURN, SYNTHETIC] */
|
|
/* JADX WARN: Removed duplicated region for block: B:8:0x0032 A[ORIG_RETURN, RETURN] */
|
|
@Override // java.lang.Comparable
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public /* synthetic */ int compareTo(o.C15155gij r8) {
|
|
/*
|
|
r7 = this;
|
|
o.gij r8 = (o.C15155gij) r8
|
|
java.lang.String r0 = ""
|
|
o.C14957gcv.e(r8, r0)
|
|
int r0 = r7.a()
|
|
int r1 = r8.a()
|
|
int r2 = java.lang.Math.min(r0, r1)
|
|
r3 = 0
|
|
r4 = r3
|
|
L15:
|
|
if (r4 >= r2) goto L2b
|
|
byte r5 = r7.c(r4)
|
|
r5 = r5 & 255(0xff, float:3.57E-43)
|
|
byte r6 = r8.c(r4)
|
|
r6 = r6 & 255(0xff, float:3.57E-43)
|
|
if (r5 != r6) goto L28
|
|
int r4 = r4 + 1
|
|
goto L15
|
|
L28:
|
|
if (r5 >= r6) goto L32
|
|
goto L30
|
|
L2b:
|
|
if (r0 != r1) goto L2e
|
|
goto L33
|
|
L2e:
|
|
if (r0 >= r1) goto L32
|
|
L30:
|
|
r3 = -1
|
|
goto L33
|
|
L32:
|
|
r3 = 1
|
|
L33:
|
|
return r3
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: o.C15155gij.compareTo(java.lang.Object):int");
|
|
}
|
|
|
|
public C15155gij b(String str) {
|
|
C14957gcv.e(str, "");
|
|
MessageDigest messageDigest = MessageDigest.getInstance(str);
|
|
messageDigest.update(this.b, 0, a());
|
|
byte[] digest = messageDigest.digest();
|
|
C14957gcv.c(digest, "");
|
|
return new C15155gij(digest);
|
|
}
|
|
|
|
public void a(C15111ghZ c15111ghZ, int i) {
|
|
C14957gcv.e(c15111ghZ, "");
|
|
giI.c(this, c15111ghZ, i);
|
|
}
|
|
|
|
private final void readObject(ObjectInputStream objectInputStream) throws IOException {
|
|
int readInt = objectInputStream.readInt();
|
|
ObjectInputStream objectInputStream2 = objectInputStream;
|
|
C14957gcv.e(objectInputStream2, "");
|
|
if (readInt < 0) {
|
|
throw new IllegalArgumentException("byteCount < 0: ".concat(String.valueOf(readInt)).toString());
|
|
}
|
|
byte[] bArr = new byte[readInt];
|
|
int i = 0;
|
|
while (i < readInt) {
|
|
int read = objectInputStream2.read(bArr, i, readInt - i);
|
|
if (read == -1) {
|
|
throw new EOFException();
|
|
}
|
|
i += read;
|
|
}
|
|
C15155gij c15155gij = new C15155gij(bArr);
|
|
Field declaredField = C15155gij.class.getDeclaredField("b");
|
|
declaredField.setAccessible(true);
|
|
declaredField.set(this, c15155gij.b);
|
|
}
|
|
|
|
private final void writeObject(ObjectOutputStream objectOutputStream) throws IOException {
|
|
objectOutputStream.writeInt(this.b.length);
|
|
objectOutputStream.write(this.b);
|
|
}
|
|
|
|
/* renamed from: o.gij$LWm */
|
|
/* loaded from: classes.dex */
|
|
public static final class LWm {
|
|
private LWm() {
|
|
}
|
|
|
|
public static C15155gij b(byte[] bArr, int i) {
|
|
C14957gcv.e(bArr, "");
|
|
int d = giE.d(bArr, i);
|
|
giE.d(bArr.length, 0L, d);
|
|
return new C15155gij(C14875gap.b(bArr, 0, d));
|
|
}
|
|
|
|
public static C15155gij e(String str) {
|
|
C14957gcv.e(str, "");
|
|
C14957gcv.e(str, "");
|
|
byte[] bytes = str.getBytes(gdP.a);
|
|
C14957gcv.c(bytes, "");
|
|
C15155gij c15155gij = new C15155gij(bytes);
|
|
c15155gij.d = str;
|
|
return c15155gij;
|
|
}
|
|
|
|
public static C15155gij b(String str) {
|
|
C14957gcv.e(str, "");
|
|
if (str.length() % 2 != 0) {
|
|
throw new IllegalArgumentException("Unexpected hex string: ".concat(String.valueOf(str)).toString());
|
|
}
|
|
int length = str.length() / 2;
|
|
byte[] bArr = new byte[length];
|
|
for (int i = 0; i < length; i++) {
|
|
int i2 = i << 1;
|
|
bArr[i] = (byte) ((giI.d(str.charAt(i2)) << 4) + giI.d(str.charAt(i2 + 1)));
|
|
}
|
|
return new C15155gij(bArr);
|
|
}
|
|
|
|
public /* synthetic */ LWm(byte b) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (obj != this) {
|
|
if (!(obj instanceof C15155gij)) {
|
|
return false;
|
|
}
|
|
C15155gij c15155gij = (C15155gij) obj;
|
|
int a = c15155gij.a();
|
|
byte[] bArr = this.b;
|
|
if (a != bArr.length || !c15155gij.e(0, bArr, 0, bArr.length)) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public static final C15155gij a(String str) {
|
|
C14957gcv.e(str, "");
|
|
C14957gcv.e(str, "");
|
|
byte[] bytes = str.getBytes(gdP.a);
|
|
C14957gcv.c(bytes, "");
|
|
C15155gij c15155gij = new C15155gij(bytes);
|
|
c15155gij.d = str;
|
|
return c15155gij;
|
|
}
|
|
|
|
public static final C15155gij e(byte... bArr) {
|
|
C14957gcv.e(bArr, "");
|
|
byte[] copyOf = Arrays.copyOf(bArr, bArr.length);
|
|
C14957gcv.c(copyOf, "");
|
|
return new C15155gij(copyOf);
|
|
}
|
|
|
|
public String e() {
|
|
return giC.b(this.b);
|
|
}
|
|
|
|
public int a() {
|
|
return this.b.length;
|
|
}
|
|
|
|
public int hashCode() {
|
|
int i = this.a;
|
|
if (i != 0) {
|
|
return i;
|
|
}
|
|
int hashCode = Arrays.hashCode(this.b);
|
|
this.a = hashCode;
|
|
return hashCode;
|
|
}
|
|
|
|
public String c() {
|
|
byte[] bArr = this.b;
|
|
char[] cArr = new char[bArr.length << 1];
|
|
int length = bArr.length;
|
|
int i = 0;
|
|
int i2 = 0;
|
|
while (i2 < length) {
|
|
byte b = bArr[i2];
|
|
cArr[i] = giI.a()[(b >> 4) & 15];
|
|
cArr[i + 1] = giI.a()[b & 15];
|
|
i2++;
|
|
i += 2;
|
|
}
|
|
C14957gcv.e(cArr, "");
|
|
return new String(cArr);
|
|
}
|
|
|
|
public byte[] b() {
|
|
return this.b;
|
|
}
|
|
|
|
public byte c(int i) {
|
|
return this.b[i];
|
|
}
|
|
|
|
public boolean d(C15155gij c15155gij, int i, int i2) {
|
|
C14957gcv.e(c15155gij, "");
|
|
return c15155gij.e(0, this.b, 0, i2);
|
|
}
|
|
|
|
public boolean e(int i, byte[] bArr, int i2, int i3) {
|
|
C14957gcv.e(bArr, "");
|
|
if (i >= 0) {
|
|
byte[] bArr2 = this.b;
|
|
if (i <= bArr2.length - i3 && i2 >= 0 && i2 <= bArr.length - i3 && giE.c(bArr2, i, bArr, i2, i3)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public C15155gij g() {
|
|
int i = 0;
|
|
while (true) {
|
|
byte[] bArr = this.b;
|
|
if (i >= bArr.length) {
|
|
return this;
|
|
}
|
|
byte b = bArr[i];
|
|
if (b >= 65 && b <= 90) {
|
|
byte[] copyOf = Arrays.copyOf(bArr, bArr.length);
|
|
C14957gcv.c(copyOf, "");
|
|
copyOf[i] = (byte) (b + 32);
|
|
for (int i2 = i + 1; i2 < copyOf.length; i2++) {
|
|
byte b2 = copyOf[i2];
|
|
if (b2 >= 65 && b2 <= 90) {
|
|
copyOf[i2] = (byte) (b2 + 32);
|
|
}
|
|
}
|
|
return new C15155gij(copyOf);
|
|
}
|
|
i++;
|
|
}
|
|
}
|
|
|
|
public byte[] j() {
|
|
byte[] bArr = this.b;
|
|
byte[] copyOf = Arrays.copyOf(bArr, bArr.length);
|
|
C14957gcv.c(copyOf, "");
|
|
return copyOf;
|
|
}
|
|
|
|
public String toString() {
|
|
byte[] bArr = this.b;
|
|
if (bArr.length == 0) {
|
|
return "[size=0]";
|
|
}
|
|
int e2 = giI.e(bArr);
|
|
if (e2 == -1) {
|
|
if (this.b.length <= 64) {
|
|
StringBuilder sb = new StringBuilder("[hex=");
|
|
sb.append(c());
|
|
sb.append(']');
|
|
return sb.toString();
|
|
}
|
|
StringBuilder sb2 = new StringBuilder("[size=");
|
|
sb2.append(this.b.length);
|
|
sb2.append(" hex=");
|
|
int c2 = giE.c(this);
|
|
byte[] bArr2 = this.b;
|
|
if (c2 > bArr2.length) {
|
|
StringBuilder sb3 = new StringBuilder("endIndex > length(");
|
|
sb3.append(this.b.length);
|
|
sb3.append(')');
|
|
throw new IllegalArgumentException(sb3.toString().toString());
|
|
}
|
|
if (c2 >= 0) {
|
|
sb2.append((c2 == bArr2.length ? this : new C15155gij(C14875gap.b(bArr2, 0, c2))).c());
|
|
sb2.append("…]");
|
|
return sb2.toString();
|
|
}
|
|
throw new IllegalArgumentException("endIndex < beginIndex".toString());
|
|
}
|
|
String str = this.d;
|
|
if (str == null) {
|
|
byte[] b = b();
|
|
C14957gcv.e(b, "");
|
|
String str2 = new String(b, gdP.a);
|
|
this.d = str2;
|
|
str = str2;
|
|
}
|
|
String substring = str.substring(0, e2);
|
|
C14957gcv.c((Object) substring, "");
|
|
String a = gdZ.a(gdZ.a(gdZ.a(substring, "\\", "\\\\"), "\n", "\\n"), "\r", "\\r");
|
|
if (e2 < str.length()) {
|
|
StringBuilder sb4 = new StringBuilder("[size=");
|
|
sb4.append(this.b.length);
|
|
sb4.append(" text=");
|
|
sb4.append(a);
|
|
sb4.append("…]");
|
|
return sb4.toString();
|
|
}
|
|
StringBuilder sb5 = new StringBuilder("[text=");
|
|
sb5.append(a);
|
|
sb5.append(']');
|
|
return sb5.toString();
|
|
}
|
|
|
|
public final void b(int i) {
|
|
this.a = i;
|
|
}
|
|
|
|
public final int d() {
|
|
return this.a;
|
|
}
|
|
}
|