package p138.p377.p391.p392.p393;

import com.rapid7.helper.smbj.io.SMB2Exception;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.nio.channels.InterruptedByTimeoutException;
import java.util.EnumSet;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import p138.p329.p341.EnumC6158;
import p138.p329.p346.C6231;
import p138.p329.p346.C6237;
import p138.p329.p346.EnumC6222;
import p138.p329.p362.p365.C6354;
import p138.p329.p362.p369.C6386;

/* JADX INFO: renamed from: ދ.ރ.ؠ.֏.֏.֏, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public abstract class AbstractC6467 {

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final EnumC6222 f19150;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public final C6386 f19151;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public final long f19152;

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public final long f19153;

    public AbstractC6467(C6386 c6386) {
        C6354 c6354 = c6386.f17828;
        this.f19150 = c6354.f17739.f17759.f17764;
        this.f19151 = c6386;
        this.f19152 = c6386.f17825;
        this.f19153 = c6354.f17747.f17706;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public <T extends C6237> T m9670(C6237 c6237, EnumSet<EnumC6158> enumSet) throws IOException {
        try {
            try {
                T t = this.f19151.m9606(c6237).get(this.f19153, TimeUnit.MILLISECONDS);
                C6231 c6231 = (C6231) t.mo9556();
                if (enumSet.contains(EnumC6158.m9481(c6231.f17394))) {
                    return t;
                }
                throw new SMB2Exception(c6231, "expected=" + enumSet);
            } catch (InterruptedException e) {
                InterruptedIOException interruptedIOException = new InterruptedIOException();
                interruptedIOException.initCause(e);
                throw interruptedIOException;
            } catch (ExecutionException e2) {
                throw new IOException(e2);
            } catch (TimeoutException e3) {
                InterruptedByTimeoutException interruptedByTimeoutException = new InterruptedByTimeoutException();
                interruptedByTimeoutException.initCause(e3);
                throw interruptedByTimeoutException;
            }
        } catch (IOException e4) {
            throw e4;
        } catch (Exception e5) {
            throw new IOException(e5);
        }
    }
}
