package com.linecorp.linesdk.a.a;

import com.bytedance.covode.number.Covode;
import com.linecorp.linesdk.a.a.a.b;
import com.linecorp.linesdk.a.a.a.c;
import java.io.IOException;
import java.io.InputStream;
import org.json.JSONException;
import org.json.JSONObject;

public abstract class a<T> implements c<T> {
    public final b LIZ;

    static {
        Covode.recordClassIndex(46019);
    }

    public abstract T LIZ(JSONObject jSONObject);

    public a() {
        this(new b());
    }

    public a(b bVar) {
        this.LIZ = bVar;
    }

    public final T LIZ(InputStream inputStream) {
        try {
            return LIZ(this.LIZ.LIZ(inputStream));
        } catch (JSONException e) {
            throw new IOException(e);
        }
    }
}
