package o;

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

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.kx, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1722kx extends InputStream {
    public final InputStream l;
    public int m = 1073741824;

    public C1722kx(InputStream inputStream) {
        this.l = inputStream;
    }

    @Override // java.io.InputStream
    public final int available() {
        return this.m;
    }

    @Override // java.io.InputStream, java.io.Closeable, java.lang.AutoCloseable
    public final void close() throws IOException {
        this.l.close();
    }

    @Override // java.io.InputStream
    public final int read() throws IOException {
        int i = this.l.read();
        if (i == -1) {
            this.m = 0;
        }
        return i;
    }

    @Override // java.io.InputStream
    public final long skip(long j) {
        return this.l.skip(j);
    }

    @Override // java.io.InputStream
    public final int read(byte[] bArr) throws IOException {
        int i = this.l.read(bArr);
        if (i == -1) {
            this.m = 0;
        }
        return i;
    }

    @Override // java.io.InputStream
    public final int read(byte[] bArr, int i, int i2) throws IOException {
        int i3 = this.l.read(bArr, i, i2);
        if (i3 == -1) {
            this.m = 0;
        }
        return i3;
    }
}
