what-the-bank/sources/com/facetec/sdk/nc.java

78 lines
1.8 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.facetec.sdk;
/* loaded from: classes.dex */
final class nc {
int a;
final byte[] b;
boolean c;
boolean d;
int e;
nc f;
nc i;
/* JADX INFO: Access modifiers changed from: package-private */
public nc() {
this.b = new byte[8192];
this.d = true;
this.c = false;
}
/* JADX INFO: Access modifiers changed from: package-private */
public nc(byte[] bArr, int i, int i2) {
this.b = bArr;
this.e = i;
this.a = i2;
this.c = true;
this.d = false;
}
/* JADX INFO: Access modifiers changed from: package-private */
public final nc c() {
this.c = true;
return new nc(this.b, this.e, this.a);
}
public final nc b() {
nc ncVar = this.i;
nc ncVar2 = ncVar != this ? ncVar : null;
nc ncVar3 = this.f;
ncVar3.i = ncVar;
this.i.f = ncVar3;
this.i = null;
this.f = null;
return ncVar2;
}
public final nc c(nc ncVar) {
ncVar.f = this;
ncVar.i = this.i;
this.i.f = ncVar;
this.i = ncVar;
return ncVar;
}
public final void a(nc ncVar, int i) {
if (!ncVar.d) {
throw new IllegalArgumentException();
}
int i2 = ncVar.a;
int i3 = i2 + i;
if (i3 > 8192) {
if (ncVar.c) {
throw new IllegalArgumentException();
}
int i4 = ncVar.e;
if (i3 - i4 > 8192) {
throw new IllegalArgumentException();
}
byte[] bArr = ncVar.b;
System.arraycopy(bArr, i4, bArr, 0, i2 - i4);
ncVar.a -= ncVar.e;
ncVar.e = 0;
}
System.arraycopy(this.b, this.e, ncVar.b, ncVar.a, i);
ncVar.a += i;
this.e += i;
}
}