66 lines
1.7 KiB
Java
66 lines
1.7 KiB
Java
|
package com.facetec.sdk;
|
||
|
|
||
|
import java.io.IOException;
|
||
|
import java.nio.charset.Charset;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public abstract class ki {
|
||
|
public long a() throws IOException {
|
||
|
return -1L;
|
||
|
}
|
||
|
|
||
|
public abstract jz b();
|
||
|
|
||
|
public abstract void d(mv mvVar) throws IOException;
|
||
|
|
||
|
public static ki e(jz jzVar, String str) {
|
||
|
Charset charset = km.c;
|
||
|
if (jzVar != null && (charset = jzVar.e()) == null) {
|
||
|
charset = km.c;
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
sb.append(jzVar);
|
||
|
sb.append("; charset=utf-8");
|
||
|
jzVar = jz.a(sb.toString());
|
||
|
}
|
||
|
return a(jzVar, str.getBytes(charset));
|
||
|
}
|
||
|
|
||
|
public static ki a(jz jzVar, byte[] bArr) {
|
||
|
return c(jzVar, bArr, bArr.length);
|
||
|
}
|
||
|
|
||
|
private static ki c(jz jzVar, byte[] bArr, int i) {
|
||
|
if (bArr == null) {
|
||
|
throw new NullPointerException("content == null");
|
||
|
}
|
||
|
km.e(bArr.length, i);
|
||
|
return new ki(jzVar, i, bArr) { // from class: com.facetec.sdk.ki.1
|
||
|
private jz a;
|
||
|
private byte[] b;
|
||
|
private int c;
|
||
|
private int d = 0;
|
||
|
|
||
|
{
|
||
|
this.a = jzVar;
|
||
|
this.c = i;
|
||
|
this.b = bArr;
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.ki
|
||
|
public final void d(mv mvVar) throws IOException {
|
||
|
mvVar.d(this.b, this.d, this.c);
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.ki
|
||
|
public final jz b() {
|
||
|
return this.a;
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.ki
|
||
|
public final long a() {
|
||
|
return this.c;
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
}
|