what-the-bank/sources/o/C0629LEh.java

94 lines
2.3 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.io.EOFException;
import java.io.IOException;
/* renamed from: o.LEh, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0629LEh extends Eaa {
private int a;
private final byte[] c;
public C0629LEh(byte[] bArr) {
this(bArr, 0);
}
public C0629LEh(byte[] bArr, int i) {
this.c = bArr;
this.a = i;
}
@Override // o.Eaa
public final byte b() throws IOException {
int i = this.a;
byte[] bArr = this.c;
if (i >= bArr.length) {
throw new EOFException("End of data reached.");
}
this.a = i + 1;
return bArr[i];
}
@Override // o.Eaa
public final byte[] a(int i) throws IOException {
int i2 = this.a;
byte[] bArr = this.c;
if (i2 + i > bArr.length) {
throw new EOFException("End of data reached.");
}
byte[] bArr2 = new byte[i];
System.arraycopy(bArr, i2, bArr2, 0, i);
this.a += i;
return bArr2;
}
@Override // o.Eaa
public final void c(byte[] bArr, int i, int i2) throws IOException {
int i3 = this.a;
byte[] bArr2 = this.c;
if (i3 + i2 > bArr2.length) {
throw new EOFException("End of data reached.");
}
System.arraycopy(bArr2, i3, bArr, i, i2);
this.a += i2;
}
@Override // o.Eaa
public final void b(long j) throws IOException {
if (j < 0) {
throw new IllegalArgumentException("n must be zero or greater.");
}
long j2 = this.a + j;
if (j2 > this.c.length) {
throw new EOFException("End of data reached.");
}
this.a = (int) j2;
}
@Override // o.Eaa
public final boolean d(long j) throws IOException {
if (j < 0) {
throw new IllegalArgumentException("n must be zero or greater.");
}
long j2 = this.a;
byte[] bArr = this.c;
long j3 = j2 + j;
if (j3 > bArr.length) {
this.a = bArr.length;
return false;
}
this.a = (int) j3;
return true;
}
@Override // o.Eaa
public final int d() {
return this.c.length - this.a;
}
@Override // o.Eaa
public final long c() {
return this.a;
}
}