package com.bumptech.glide.load;

import com.bumptech.glide.load.g;
import defpackage.ys;
import java.io.IOException;
import java.io.InputStream;

/* JADX INFO: loaded from: classes.dex */
class e implements g.a {
    public final /* synthetic */ InputStream a;
    public final /* synthetic */ ys b;

    public e(InputStream inputStream, ys ysVar) {
        this.a = inputStream;
        this.b = ysVar;
    }

    @Override // com.bumptech.glide.load.g.a
    public final int a(ImageHeaderParser imageHeaderParser) throws IOException {
        InputStream inputStream = this.a;
        try {
            return imageHeaderParser.a(inputStream, this.b);
        } finally {
            inputStream.reset();
        }
    }
}
