jimu-decompiled/sources/com/bumptech/glide/load/data/InputStreamRewinder.java
2025-05-13 19:24:51 +02:00

48 lines
1.5 KiB
Java

package com.bumptech.glide.load.data;
import com.bumptech.glide.load.data.DataRewinder;
import com.bumptech.glide.load.engine.bitmap_recycle.ArrayPool;
import com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
/* loaded from: classes.dex */
public final class InputStreamRewinder implements DataRewinder<InputStream> {
private final RecyclableBufferedInputStream a;
public static final class Factory implements DataRewinder.Factory<InputStream> {
private final ArrayPool a;
public Factory(ArrayPool arrayPool) {
this.a = arrayPool;
}
@Override // com.bumptech.glide.load.data.DataRewinder.Factory
public DataRewinder<InputStream> a(InputStream inputStream) {
return new InputStreamRewinder(inputStream, this.a);
}
@Override // com.bumptech.glide.load.data.DataRewinder.Factory
public Class<InputStream> a() {
return InputStream.class;
}
}
InputStreamRewinder(InputStream inputStream, ArrayPool arrayPool) {
this.a = new RecyclableBufferedInputStream(inputStream, arrayPool);
this.a.mark(5242880);
}
@Override // com.bumptech.glide.load.data.DataRewinder
public void b() {
this.a.b();
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.bumptech.glide.load.data.DataRewinder
public InputStream a() throws IOException {
this.a.reset();
return this.a;
}
}