工作空间 v3.7.4.6版本的 MD5 值为:94c1c0052e9f2e949ae1349e6caf437b
以下内容为反编译后的 g.java 源代码,内容仅作参考
package com.bumptech.glide.load.b;
import androidx.annotation.NonNull;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.a.d;
import com.bumptech.glide.load.b.u;
import java.io.IOException;
import java.io.InputStream;
public final class g<Model, Data> implements u<Model, Data> {
private final a<Data> f2346a;
public interface a<Data> {
void a(Data data) throws IOException;
Data decode(String str) throws IllegalArgumentException;
Class<Data> getDataClass();
}
private static final class b<Data> implements com.bumptech.glide.load.a.d<Data> {
private final String f2347a;
private final a<Data> f2348b;
private Data f2349c;
b(String str, a<Data> aVar) {
this.f2347a = str;
this.f2348b = aVar;
}
@Override
public void cancel() {
}
@Override
public void cleanup() {
try {
this.f2348b.a(this.f2349c);
} catch (IOException unused) {
}
}
@Override
@NonNull
public Class<Data> getDataClass() {
return this.f2348b.getDataClass();
}
@Override
@NonNull
public DataSource getDataSource() {
return DataSource.LOCAL;
}
@Override
public void loadData(@NonNull Priority priority, @NonNull d.a<? super Data> aVar) {
try {
this.f2349c = this.f2348b.decode(this.f2347a);
aVar.a((d.a<? super Data>) ((Data) this.f2349c));
} catch (IllegalArgumentException e2) {
aVar.a((Exception) e2);
}
}
}
public static final class c<Model> implements v<Model, InputStream> {
private final a<InputStream> f2350a = new h(this);
@Override
@NonNull
public u<Model, InputStream> build(@NonNull y yVar) {
return new g(this.f2350a);
}
@Override
public void teardown() {
}
}
public g(a<Data> aVar) {
this.f2346a = aVar;
}
@Override
public u.a<Data> buildLoadData(@NonNull Model model, int i, int i2, @NonNull com.bumptech.glide.load.l lVar) {
return new u.a<>(new com.bumptech.glide.e.d(model), new b(model.toString(), this.f2346a));
}
@Override
public boolean handles(@NonNull Model model) {
return model.toString().startsWith("data:image");
}
}