41 lines
1.0 KiB
Java
41 lines
1.0 KiB
Java
package o;
|
|
|
|
import java.nio.ByteBuffer;
|
|
import java.nio.ByteOrder;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class ozZ {
|
|
public static final byte[] a(int i, int i2) {
|
|
int i3 = 4;
|
|
byte[] array = ByteBuffer.allocate(4).order(ByteOrder.BIG_ENDIAN).putInt(i).array();
|
|
ByteBuffer allocate = ByteBuffer.allocate(i2);
|
|
boolean z = true;
|
|
for (byte b : array) {
|
|
if (z) {
|
|
if (b != 0 || i3 <= i2) {
|
|
z = false;
|
|
} else {
|
|
i3--;
|
|
}
|
|
}
|
|
i3--;
|
|
allocate.put(b);
|
|
}
|
|
return allocate.array();
|
|
}
|
|
|
|
public static byte[] d(byte[]... bArr) {
|
|
int i = 0;
|
|
for (byte[] bArr2 : bArr) {
|
|
i += bArr2.length;
|
|
}
|
|
byte[] bArr3 = new byte[i];
|
|
int i2 = 0;
|
|
for (byte[] bArr4 : bArr) {
|
|
System.arraycopy(bArr4, 0, bArr3, i2, bArr4.length);
|
|
i2 += bArr4.length;
|
|
}
|
|
return bArr3;
|
|
}
|
|
}
|