what-the-bank/sources/o/C15255glj.java

62 lines
1.7 KiB
Java

package o;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
/* renamed from: o.glj, reason: case insensitive filesystem */
/* loaded from: classes6.dex */
public final class C15255glj extends AbstractC15252glg {
private final byte[] b;
@Override // o.InterfaceC15251glf
public final String a() {
return null;
}
@Deprecated
private C15255glj(String str, String str2, Charset charset) throws UnsupportedEncodingException {
this(str, gkT.b(str2, charset == null ? gkR.b : charset));
}
@Deprecated
public C15255glj(String str, Charset charset) throws UnsupportedEncodingException {
this(str, "text/plain", charset);
}
private C15255glj(String str, gkT gkt) {
super(gkt);
C15264gls.c(str, "Text");
Charset charset = gkt.d;
this.b = str.getBytes(charset == null ? gkR.b : charset);
}
@Override // o.InterfaceC15251glf
public final void c(OutputStream outputStream) throws IOException {
C15264gls.c(outputStream, "Output stream");
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(this.b);
byte[] bArr = new byte[4096];
while (true) {
int read = byteArrayInputStream.read(bArr);
if (read != -1) {
outputStream.write(bArr, 0, read);
} else {
outputStream.flush();
return;
}
}
}
@Override // o.InterfaceC15249gld
public final long d() {
return this.b.length;
}
@Override // o.InterfaceC15249gld
public final String c() {
return "8bit";
}
}