what-the-bank/sources/com/huawei/hms/hatool/h.java

45 lines
1009 B
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.huawei.hms.hatool;
/* loaded from: classes2.dex */
public class h {
private byte[] a;
private int b = 0;
public int b() {
return this.b;
}
public byte[] a() {
int i = this.b;
if (i <= 0) {
return new byte[0];
}
byte[] bArr = new byte[i];
System.arraycopy(this.a, 0, bArr, 0, i);
return bArr;
}
public void a(byte[] bArr, int i) {
if (i <= 0) {
return;
}
byte[] bArr2 = this.a;
int length = bArr2.length;
int i2 = this.b;
if (length - i2 >= i) {
System.arraycopy(bArr, 0, bArr2, i2, i);
} else {
byte[] bArr3 = new byte[(bArr2.length + i) << 1];
System.arraycopy(bArr2, 0, bArr3, 0, i2);
System.arraycopy(bArr, 0, bArr3, this.b, i);
this.a = bArr3;
}
this.b += i;
}
public h(int i) {
this.a = null;
this.a = new byte[i];
}
}