涩里番 v4.2版本的 MD5 值为:b7af51031b798a68c7a3a9ba5a0dff66
以下内容为反编译后的 d.java 源代码,内容仅作参考
package n3;
import android.util.Base64;
import com.bumptech.glide.load.data.d;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Objects;
import n3.n;
public final class d<Model, Data> implements n<Model, Data> {
public final a<Data> f11866a;
public interface a<Data> {
}
public static final class b<Data> implements com.bumptech.glide.load.data.d<Data> {
public final String f11867i;
public final a<Data> f11868j;
public ByteArrayInputStream f11869k;
public b(String str, a<Data> aVar) {
this.f11867i = str;
this.f11868j = aVar;
}
@Override
public final Class<Data> a() {
Objects.requireNonNull((c.a) this.f11868j);
return InputStream.class;
}
@Override
public final void b() {
try {
a<Data> aVar = this.f11868j;
ByteArrayInputStream byteArrayInputStream = this.f11869k;
Objects.requireNonNull((c.a) aVar);
byteArrayInputStream.close();
} catch (IOException unused) {
}
}
@Override
public final void cancel() {
}
@Override
public final void e(com.bumptech.glide.i iVar, d.a<? super Data> aVar) {
try {
Object a10 = ((c.a) this.f11868j).a(this.f11867i);
this.f11869k = (ByteArrayInputStream) a10;
aVar.d(a10);
} catch (IllegalArgumentException e10) {
aVar.c(e10);
}
}
@Override
public final h3.a getDataSource() {
return h3.a.LOCAL;
}
}
public static final class c<Model> implements o<Model, InputStream> {
public final a<InputStream> f11870i = new a();
public class a implements a<InputStream> {
public final Object a(String str) {
if (str.startsWith("data:image")) {
int indexOf = str.indexOf(44);
if (indexOf != -1) {
if (str.substring(0, indexOf).endsWith(";base64")) {
return new ByteArrayInputStream(Base64.decode(str.substring(indexOf + 1), 0));
}
throw new IllegalArgumentException("Not a base64 image data URL.");
}
throw new IllegalArgumentException("Missing comma in data URL.");
}
throw new IllegalArgumentException("Not a valid image data URL.");
}
}
@Override
public final n<Model, InputStream> b0(r rVar) {
return new d(this.f11870i);
}
}
public d(a<Data> aVar) {
this.f11866a = aVar;
}
@Override
public final n.a<Data> a(Model model, int i2, int i10, h3.i iVar) {
return new n.a<>(new c4.b(model), new b(model.toString(), this.f11866a));
}
@Override
public final boolean b(Model model) {
return model.toString().startsWith("data:image");
}
}