49 lines
1.2 KiB
Java
49 lines
1.2 KiB
Java
|
package com.facetec.sdk;
|
||
|
|
||
|
import java.io.IOException;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public abstract class ek<T> {
|
||
|
public abstract T a(fu fuVar) throws IOException;
|
||
|
|
||
|
public abstract void b(ga gaVar, T t) throws IOException;
|
||
|
|
||
|
public final ek<T> b() {
|
||
|
return new ek<T>(this) { // from class: com.facetec.sdk.ek.3
|
||
|
private ek e;
|
||
|
|
||
|
{
|
||
|
this.e = this;
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.ek
|
||
|
public final void b(ga gaVar, T t) throws IOException {
|
||
|
if (t == null) {
|
||
|
gaVar.h();
|
||
|
} else {
|
||
|
this.e.b(gaVar, t);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.ek
|
||
|
public final T a(fu fuVar) throws IOException {
|
||
|
if (fuVar.i() == gc.NULL) {
|
||
|
fuVar.l();
|
||
|
return null;
|
||
|
}
|
||
|
return (T) this.e.a(fuVar);
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
public final eb c(T t) {
|
||
|
try {
|
||
|
fl flVar = new fl();
|
||
|
b(flVar, t);
|
||
|
return flVar.c();
|
||
|
} catch (IOException e) {
|
||
|
throw new ed(e);
|
||
|
}
|
||
|
}
|
||
|
}
|