package ඓ.ῲ.K.ᓣ;

import java.io.IOException;
import java.io.InputStream;
import java.util.Queue;

/* renamed from: ඓ.ῲ.K.ᓣ.㸾  reason: contains not printable characters */
/* compiled from: ExceptionCatchingInputStream */
public class C0848 extends InputStream {

    /* renamed from: 㸾  reason: contains not printable characters */
    public static final Queue<C0848> f4074 = C0845.m2458(0);

    /* renamed from: ʬ  reason: contains not printable characters */
    public IOException f4075;

    /* renamed from: ῲ  reason: contains not printable characters */
    public InputStream f4076;

    /* renamed from: K  reason: contains not printable characters */
    public static C0848 m2464(InputStream inputStream) {
        C0848 poll;
        synchronized (f4074) {
            poll = f4074.poll();
        }
        if (poll == null) {
            poll = new C0848();
        }
        poll.f4076 = inputStream;
        return poll;
    }

    @Override // java.io.InputStream
    public int available() throws IOException {
        return this.f4076.available();
    }

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

    public void mark(int i) {
        this.f4076.mark(i);
    }

    public boolean markSupported() {
        return this.f4076.markSupported();
    }

    @Override // java.io.InputStream
    public int read(byte[] bArr) {
        try {
            return this.f4076.read(bArr);
        } catch (IOException e) {
            this.f4075 = e;
            return -1;
        }
    }

    @Override // java.io.InputStream
    public synchronized void reset() throws IOException {
        this.f4076.reset();
    }

    @Override // java.io.InputStream
    public long skip(long j) {
        try {
            return this.f4076.skip(j);
        } catch (IOException e) {
            this.f4075 = e;
            return 0;
        }
    }

    /* renamed from: ᨨ  reason: contains not printable characters */
    public void m2465() {
        this.f4075 = null;
        this.f4076 = null;
        synchronized (f4074) {
            f4074.offer(this);
        }
    }

    @Override // java.io.InputStream
    public int read(byte[] bArr, int i, int i2) {
        try {
            return this.f4076.read(bArr, i, i2);
        } catch (IOException e) {
            this.f4075 = e;
            return -1;
        }
    }

    @Override // java.io.InputStream
    public int read() {
        try {
            return this.f4076.read();
        } catch (IOException e) {
            this.f4075 = e;
            return -1;
        }
    }
}
