60 lines
1.6 KiB
Java
60 lines
1.6 KiB
Java
|
package o;
|
||
|
|
||
|
import com.drew.lang.BufferBoundsException;
|
||
|
import java.io.IOException;
|
||
|
|
||
|
/* renamed from: o.RrQ, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class C0925RrQ extends Pmg {
|
||
|
private final int a;
|
||
|
private final byte[] c;
|
||
|
|
||
|
public C0925RrQ(byte[] bArr) {
|
||
|
this(bArr, 0);
|
||
|
}
|
||
|
|
||
|
public C0925RrQ(byte[] bArr, int i) {
|
||
|
if (i >= 0) {
|
||
|
this.c = bArr;
|
||
|
this.a = i;
|
||
|
return;
|
||
|
}
|
||
|
throw new IllegalArgumentException("Must be zero or greater");
|
||
|
}
|
||
|
|
||
|
@Override // o.Pmg
|
||
|
public final long a() {
|
||
|
return this.c.length - this.a;
|
||
|
}
|
||
|
|
||
|
@Override // o.Pmg
|
||
|
protected final void a(int i, int i2) throws IOException {
|
||
|
if (!b(i, i2)) {
|
||
|
throw new BufferBoundsException(i + this.a, i2, this.c.length);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.Pmg
|
||
|
protected final boolean b(int i, int i2) throws IOException {
|
||
|
return i2 >= 0 && i >= 0 && (((long) i) + ((long) i2)) - 1 < ((long) (this.c.length - this.a));
|
||
|
}
|
||
|
|
||
|
@Override // o.Pmg
|
||
|
public final byte d(int i) throws IOException {
|
||
|
if (b(i, 1)) {
|
||
|
return this.c[i + this.a];
|
||
|
}
|
||
|
throw new BufferBoundsException(i + this.a, 1, this.c.length);
|
||
|
}
|
||
|
|
||
|
@Override // o.Pmg
|
||
|
public final byte[] c(int i, int i2) throws IOException {
|
||
|
if (b(i, i2)) {
|
||
|
byte[] bArr = new byte[i2];
|
||
|
System.arraycopy(this.c, i + this.a, bArr, 0, i2);
|
||
|
return bArr;
|
||
|
}
|
||
|
throw new BufferBoundsException(i + this.a, i2, this.c.length);
|
||
|
}
|
||
|
}
|