/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.mime.NoSuchPartException
 *  com.l7tech.common.mime.PartInfo
 *  com.l7tech.gateway.common.custom.ContentTypeHeaderToCustomConverter
 *  com.l7tech.policy.assertion.ext.message.CustomContentType
 *  com.l7tech.policy.assertion.ext.message.knob.CustomPartsKnob$Part
 */
package com.l7tech.server.custom.knob;

import com.l7tech.common.mime.NoSuchPartException;
import com.l7tech.common.mime.PartInfo;
import com.l7tech.gateway.common.custom.ContentTypeHeaderToCustomConverter;
import com.l7tech.policy.assertion.ext.message.CustomContentType;
import com.l7tech.policy.assertion.ext.message.knob.CustomPartsKnob;
import com.l7tech.server.custom.knob.a;
import java.io.IOException;
import java.io.InputStream;

class b
implements CustomPartsKnob.Part {
    final PartInfo val$partInfo;
    final a this$1;

    /*
     * Ignored method signature, as it can't be verified against descriptor
     */
    b(a a10, PartInfo partInfo) {
        this.this$1 = a10;
        this.val$partInfo = partInfo;
    }

    public CustomContentType getContentType() {
        return new ContentTypeHeaderToCustomConverter(this.val$partInfo.getContentType());
    }

    public InputStream getInputStream() throws IOException {
        try {
            return this.val$partInfo.getInputStream(this.this$1.val$disallowBuffering);
        }
        catch (NoSuchPartException noSuchPartException) {
            String string;
            IOException iOException;
            IOException iOException2;
            block5: {
                block4: {
                    String string2 = noSuchPartException.getWhatWasMissing();
                    try {
                        IOException iOException3;
                        iOException2 = iOException3;
                        iOException = iOException3;
                        if (string2 == null || string2.isEmpty()) break block4;
                    }
                    catch (NoSuchPartException noSuchPartException2) {
                        throw b.a(noSuchPartException2);
                    }
                    string = string2;
                    break block5;
                }
                string = noSuchPartException.getMessage();
            }
            iOException2(string, noSuchPartException);
            throw iOException;
        }
    }

    private static NoSuchPartException a(NoSuchPartException noSuchPartException) {
        return noSuchPartException;
    }
}

