package defpackage;

import java.io.ByteArrayInputStream;
import java.io.FilterInputStream;
import java.io.IOException;

/* JADX INFO: renamed from: ᵘʽ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C2546 extends FilterInputStream {

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public long f9846;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public long f9847;

    public C2546(ByteArrayInputStream byteArrayInputStream) {
        super(byteArrayInputStream);
        this.f9847 = -1L;
    }

    @Override // java.io.FilterInputStream, java.io.InputStream
    public final synchronized void mark(int i) {
        ((FilterInputStream) this).in.mark(i);
        this.f9847 = this.f9846;
    }

    @Override // java.io.FilterInputStream, java.io.InputStream
    public final int read() throws IOException {
        int i = ((FilterInputStream) this).in.read();
        if (i != -1) {
            this.f9846++;
        }
        return i;
    }

    @Override // java.io.FilterInputStream, java.io.InputStream
    public final int read(byte[] bArr, int i, int i2) throws IOException {
        int i3 = ((FilterInputStream) this).in.read(bArr, i, i2);
        if (i3 != -1) {
            this.f9846 += (long) i3;
        }
        return i3;
    }

    @Override // java.io.FilterInputStream, java.io.InputStream
    public final synchronized void reset() {
        if (!((FilterInputStream) this).in.markSupported()) {
            throw new IOException("Mark not supported");
        }
        if (this.f9847 == -1) {
            throw new IOException("Mark not set");
        }
        ((FilterInputStream) this).in.reset();
        this.f9846 = this.f9847;
    }

    @Override // java.io.FilterInputStream, java.io.InputStream
    public final long skip(long j) throws IOException {
        long jSkip = ((FilterInputStream) this).in.skip(j);
        this.f9846 += jSkip;
        return jSkip;
    }
}
