Swiggy v4.51.1版本的 MD5 值为:5af7ec91512a0a8c1510e3f8bac20b8b
以下内容为反编译后的 e.java 源代码,内容仅作参考
package com.bumptech.glide.load.model;
import android.util.Base64;
import androidx.annotation.NonNull;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.data.d;
import com.bumptech.glide.load.model.o;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
public final class e<Model, Data> implements o<Model, Data> {
private final a<Data> a;
public interface a<Data> {
Class<Data> a();
void b(Data data) throws IOException;
Data c(String str) throws IllegalArgumentException;
}
private static final class b<Data> implements com.bumptech.glide.load.data.d<Data> {
private final String a;
private final a<Data> b;
private Data c;
b(String str, a<Data> aVar) {
this.a = str;
this.b = aVar;
}
@Override
@NonNull
public Class<Data> a() {
return this.b.a();
}
@Override
public void b() {
try {
this.b.b(this.c);
} catch (IOException unused) {
}
}
@Override
@NonNull
public DataSource c() {
return DataSource.LOCAL;
}
@Override
public void cancel() {
}
@Override
public void d(@NonNull Priority priority, @NonNull d.a<? super Data> aVar) {
try {
Data c = this.b.c(this.a);
this.c = c;
aVar.e(c);
} catch (IllegalArgumentException e) {
aVar.f(e);
}
}
}
public static final class c<Model> implements p<Model, InputStream> {
private final a<InputStream> a = new a();
class a implements a<InputStream> {
a() {
}
@Override
public Class<InputStream> a() {
return InputStream.class;
}
@Override
public void b(InputStream inputStream) throws IOException {
inputStream.close();
}
@Override
public InputStream c(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 void d() {
}
@Override
@NonNull
public o<Model, InputStream> e(@NonNull s sVar) {
return new e(this.a);
}
}
public e(a<Data> aVar) {
this.a = aVar;
}
@Override
public o.a<Data> a(@NonNull Model model, int i, int i2, @NonNull com.bumptech.glide.load.e eVar) {
return new o.a<>(new com.bumptech.glide.signature.d(model), new b(model.toString(), this.a));
}
@Override
public boolean b(@NonNull Model model) {
return model.toString().startsWith("data:image");
}
}