package h1;

import java.io.IOException;
import java.io.InputStream;

/* JADX INFO: loaded from: classes.dex */
public final class f extends b {
    public f(byte[] bArr) {
        super(bArr);
        this.f26354a.mark(Integer.MAX_VALUE);
    }

    public final void g(long j10) throws IOException {
        int i10 = this.f26356c;
        if (i10 > j10) {
            this.f26356c = 0;
            this.f26354a.reset();
        } else {
            j10 -= (long) i10;
        }
        e((int) j10);
    }

    public f(InputStream inputStream) {
        super(inputStream);
        if (inputStream.markSupported()) {
            this.f26354a.mark(Integer.MAX_VALUE);
            return;
        }
        throw new IllegalArgumentException("Cannot create SeekableByteOrderedDataInputStream with stream that does not support mark/reset");
    }
}
