灵犀直播 v1.0.127版本的 MD5 值为:a63989b077d9456fb57c6835ee2849a1
以下内容为反编译后的 e.java 源代码,内容仅作参考
package c.b.a.p.q;
import android.util.Base64;
import androidx.annotation.NonNull;
import c.b.a.p.o.d;
import c.b.a.p.q.n;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
public final class e<Model, Data> implements n<Model, Data> {
public final a<Data> f1518a;
public interface a<Data> {
Class<Data> a();
Data b(String str);
void close(Data data);
}
public static final class b<Data> implements c.b.a.p.o.d<Data> {
public final String f1519a;
public final a<Data> f1520b;
public Data f1521c;
public b(String str, a<Data> aVar) {
this.f1519a = str;
this.f1520b = aVar;
}
@Override
@NonNull
public Class<Data> a() {
return this.f1520b.a();
}
@Override
public void b() {
try {
this.f1520b.close(this.f1521c);
} catch (IOException unused) {
}
}
@Override
public void cancel() {
}
@Override
public void d(@NonNull c.b.a.h hVar, @NonNull d.a<? super Data> aVar) {
try {
Data b2 = this.f1520b.b(this.f1519a);
this.f1521c = b2;
aVar.e(b2);
} catch (IllegalArgumentException e2) {
aVar.c(e2);
}
}
@Override
@NonNull
public c.b.a.p.a getDataSource() {
return c.b.a.p.a.LOCAL;
}
}
public static final class c<Model> implements o<Model, InputStream> {
public final a<InputStream> f1522a = new a();
public class a implements a<InputStream> {
public a() {
}
@Override
public Class<InputStream> a() {
return InputStream.class;
}
@Override
public void close(InputStream inputStream) {
inputStream.close();
}
@Override
public InputStream b(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 a() {
}
@Override
@NonNull
public n<Model, InputStream> c(@NonNull r rVar) {
return new e(this.f1522a);
}
}
public e(a<Data> aVar) {
this.f1518a = aVar;
}
@Override
public boolean a(@NonNull Model model) {
return model.toString().startsWith("data:image");
}
@Override
public n.a<Data> b(@NonNull Model model, int i, int i2, @NonNull c.b.a.p.j jVar) {
return new n.a<>(new c.b.a.u.d(model), new b(model.toString(), this.f1518a));
}
}