2021-11-02 06:38:17 +00:00
|
|
|
package g0;
|
|
|
|
|
|
|
|
import androidx.recyclerview.widget.RecyclerView;
|
2021-12-17 21:59:34 +00:00
|
|
|
import b.i.a.f.e.o.f;
|
2021-11-02 06:38:17 +00:00
|
|
|
import d0.g0.c;
|
|
|
|
import d0.t.j;
|
|
|
|
import d0.z.d.m;
|
|
|
|
import java.io.Closeable;
|
|
|
|
import java.io.EOFException;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.InputStream;
|
|
|
|
import java.nio.ByteBuffer;
|
|
|
|
import java.nio.channels.ByteChannel;
|
|
|
|
import java.nio.charset.Charset;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.Objects;
|
|
|
|
import okio.BufferedSink;
|
|
|
|
import okio.ByteString;
|
2022-03-07 09:34:54 +00:00
|
|
|
import org.objectweb.asm.Opcodes;
|
2021-11-02 06:38:17 +00:00
|
|
|
/* compiled from: Buffer.kt */
|
2022-03-07 09:34:54 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-11-02 06:38:17 +00:00
|
|
|
public final class e implements g, BufferedSink, Cloneable, ByteChannel {
|
2021-12-02 18:53:44 +00:00
|
|
|
public s j;
|
|
|
|
public long k;
|
2021-11-02 06:38:17 +00:00
|
|
|
|
|
|
|
/* compiled from: Buffer.kt */
|
2022-03-07 09:34:54 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-11-02 06:38:17 +00:00
|
|
|
public static final class a implements Closeable {
|
2021-12-02 18:53:44 +00:00
|
|
|
public e j;
|
|
|
|
public boolean k;
|
|
|
|
public s l;
|
|
|
|
public byte[] n;
|
2022-03-07 09:34:54 +00:00
|
|
|
public long m = -1;
|
2021-11-02 06:38:17 +00:00
|
|
|
public int o = -1;
|
2021-12-02 18:53:44 +00:00
|
|
|
public int p = -1;
|
2021-11-02 06:38:17 +00:00
|
|
|
|
|
|
|
public final long a(long j) {
|
2021-12-02 18:53:44 +00:00
|
|
|
e eVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (eVar == null) {
|
|
|
|
throw new IllegalStateException("not attached to a buffer".toString());
|
2021-12-02 18:53:44 +00:00
|
|
|
} else if (this.k) {
|
|
|
|
long j2 = eVar.k;
|
2021-11-02 06:38:17 +00:00
|
|
|
int i = 1;
|
|
|
|
int i2 = (j > j2 ? 1 : (j == j2 ? 0 : -1));
|
|
|
|
if (i2 <= 0) {
|
|
|
|
if (j >= 0) {
|
|
|
|
long j3 = j2 - j;
|
|
|
|
while (true) {
|
|
|
|
if (j3 > 0) {
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar = eVar.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
s sVar2 = sVar.g;
|
|
|
|
if (sVar2 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
int i3 = sVar2.c;
|
2022-03-21 18:52:30 +00:00
|
|
|
long j4 = i3 - sVar2.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j4 > j3) {
|
2021-12-17 21:59:34 +00:00
|
|
|
sVar2.c = i3 - ((int) j3);
|
2021-11-02 06:38:17 +00:00
|
|
|
break;
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
eVar.j = sVar2.a();
|
2021-11-02 06:38:17 +00:00
|
|
|
t.a(sVar2);
|
|
|
|
j3 -= j4;
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
this.l = null;
|
|
|
|
this.m = j;
|
|
|
|
this.n = null;
|
2021-11-02 06:38:17 +00:00
|
|
|
this.o = -1;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.p = -1;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
2021-12-17 21:59:34 +00:00
|
|
|
throw new IllegalArgumentException(b.d.b.a.a.s("newSize < 0: ", j).toString());
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
} else if (i2 > 0) {
|
|
|
|
long j5 = j - j2;
|
|
|
|
boolean z2 = true;
|
|
|
|
while (j5 > 0) {
|
|
|
|
s N = eVar.N(i);
|
2022-03-07 09:34:54 +00:00
|
|
|
int min = (int) Math.min(j5, 8192 - N.c);
|
2021-12-17 21:59:34 +00:00
|
|
|
int i4 = N.c + min;
|
|
|
|
N.c = i4;
|
2022-03-07 09:34:54 +00:00
|
|
|
j5 -= min;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (z2) {
|
2021-12-02 18:53:44 +00:00
|
|
|
this.l = N;
|
|
|
|
this.m = j2;
|
|
|
|
this.n = N.a;
|
|
|
|
this.o = i4 - min;
|
|
|
|
this.p = i4;
|
2021-11-02 06:38:17 +00:00
|
|
|
z2 = false;
|
|
|
|
}
|
|
|
|
i = 1;
|
|
|
|
}
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
eVar.k = j;
|
2021-11-02 06:38:17 +00:00
|
|
|
return j2;
|
|
|
|
} else {
|
|
|
|
throw new IllegalStateException("resizeBuffer() only permitted for read/write buffers".toString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public final int b(long j) {
|
|
|
|
long j2;
|
|
|
|
s sVar;
|
2021-12-02 18:53:44 +00:00
|
|
|
e eVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (eVar != null) {
|
2022-03-07 09:34:54 +00:00
|
|
|
if (j >= -1) {
|
2021-12-02 18:53:44 +00:00
|
|
|
long j3 = eVar.k;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j <= j3) {
|
|
|
|
if (j == -1 || j == j3) {
|
2021-12-02 18:53:44 +00:00
|
|
|
this.l = null;
|
|
|
|
this.m = j;
|
|
|
|
this.n = null;
|
2021-11-02 06:38:17 +00:00
|
|
|
this.o = -1;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.p = -1;
|
2021-11-02 06:38:17 +00:00
|
|
|
return -1;
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar2 = eVar.j;
|
|
|
|
s sVar3 = this.l;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar3 != null) {
|
2021-12-02 18:53:44 +00:00
|
|
|
long j4 = this.m;
|
|
|
|
int i = this.o;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar3 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
j2 = j4 - (i - sVar3.f3675b);
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j2 > j) {
|
2021-12-02 18:53:44 +00:00
|
|
|
sVar2 = this.l;
|
2022-03-07 09:34:54 +00:00
|
|
|
sVar = sVar2;
|
2021-11-02 06:38:17 +00:00
|
|
|
j3 = j2;
|
|
|
|
j2 = 0;
|
|
|
|
} else {
|
2021-12-02 18:53:44 +00:00
|
|
|
sVar = this.l;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
j2 = 0;
|
|
|
|
sVar = sVar2;
|
|
|
|
}
|
|
|
|
if (j3 - j > j - j2) {
|
|
|
|
while (true) {
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
int i2 = sVar.c;
|
2022-03-21 18:52:30 +00:00
|
|
|
int i3 = sVar.f3675b;
|
2022-03-07 09:34:54 +00:00
|
|
|
if (j < (i2 - i3) + j2) {
|
2021-11-02 06:38:17 +00:00
|
|
|
break;
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
j2 += i2 - i3;
|
2021-11-02 06:38:17 +00:00
|
|
|
sVar = sVar.f;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
while (j3 > j) {
|
|
|
|
if (sVar2 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
sVar2 = sVar2.g;
|
|
|
|
if (sVar2 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
j3 -= sVar2.c - sVar2.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
sVar = sVar2;
|
|
|
|
j2 = j3;
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
if (this.k) {
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
if (sVar.d) {
|
|
|
|
byte[] bArr = sVar.a;
|
|
|
|
byte[] copyOf = Arrays.copyOf(bArr, bArr.length);
|
|
|
|
m.checkExpressionValueIsNotNull(copyOf, "java.util.Arrays.copyOf(this, size)");
|
2022-03-21 18:52:30 +00:00
|
|
|
s sVar4 = new s(copyOf, sVar.f3675b, sVar.c, false, true);
|
2021-12-02 18:53:44 +00:00
|
|
|
if (eVar.j == sVar) {
|
|
|
|
eVar.j = sVar4;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
sVar.b(sVar4);
|
|
|
|
s sVar5 = sVar4.g;
|
|
|
|
if (sVar5 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
sVar5.a();
|
|
|
|
sVar = sVar4;
|
|
|
|
}
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
this.l = sVar;
|
|
|
|
this.m = j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
this.n = sVar.a;
|
2022-03-21 18:52:30 +00:00
|
|
|
int i4 = sVar.f3675b + ((int) (j - j2));
|
2021-12-02 18:53:44 +00:00
|
|
|
this.o = i4;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i5 = sVar.c;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.p = i5;
|
2021-11-02 06:38:17 +00:00
|
|
|
return i5 - i4;
|
|
|
|
}
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
String format = String.format("offset=%s > size=%s", Arrays.copyOf(new Object[]{Long.valueOf(j), Long.valueOf(eVar.k)}, 2));
|
2021-11-02 06:38:17 +00:00
|
|
|
m.checkExpressionValueIsNotNull(format, "java.lang.String.format(format, *args)");
|
|
|
|
throw new ArrayIndexOutOfBoundsException(format);
|
|
|
|
}
|
|
|
|
throw new IllegalStateException("not attached to a buffer".toString());
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // java.io.Closeable, java.lang.AutoCloseable
|
|
|
|
public void close() {
|
2021-12-02 18:53:44 +00:00
|
|
|
if (this.j != null) {
|
|
|
|
this.j = null;
|
|
|
|
this.l = null;
|
2022-03-07 09:34:54 +00:00
|
|
|
this.m = -1L;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.n = null;
|
2021-11-02 06:38:17 +00:00
|
|
|
this.o = -1;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.p = -1;
|
2021-11-02 06:38:17 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
throw new IllegalStateException("not attached to a buffer".toString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: Buffer.kt */
|
2022-03-07 09:34:54 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-11-02 06:38:17 +00:00
|
|
|
public static final class b extends InputStream {
|
2022-03-07 09:34:54 +00:00
|
|
|
public b() {
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // java.io.InputStream
|
|
|
|
public int available() {
|
2022-03-07 09:34:54 +00:00
|
|
|
return (int) Math.min(e.this.k, Integer.MAX_VALUE);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // java.io.InputStream, java.io.Closeable, java.lang.AutoCloseable
|
|
|
|
public void close() {
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // java.io.InputStream
|
|
|
|
public int read() {
|
2022-03-07 09:34:54 +00:00
|
|
|
e eVar = e.this;
|
2021-12-02 18:53:44 +00:00
|
|
|
if (eVar.k > 0) {
|
2021-11-02 06:38:17 +00:00
|
|
|
return eVar.readByte() & 255;
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // java.io.InputStream
|
|
|
|
public int read(byte[] bArr, int i, int i2) {
|
|
|
|
m.checkParameterIsNotNull(bArr, "sink");
|
2022-03-07 09:34:54 +00:00
|
|
|
return e.this.read(bArr, i, i2);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public String toString() {
|
2022-03-07 09:34:54 +00:00
|
|
|
return e.this + ".inputStream()";
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-05 06:48:17 +00:00
|
|
|
public String A(long j, Charset charset) throws EOFException {
|
2021-11-02 06:38:17 +00:00
|
|
|
m.checkParameterIsNotNull(charset, "charset");
|
2022-03-07 09:34:54 +00:00
|
|
|
int i = (j > 0L ? 1 : (j == 0L ? 0 : -1));
|
2021-11-02 06:38:17 +00:00
|
|
|
if (!(i >= 0 && j <= ((long) Integer.MAX_VALUE))) {
|
2021-12-17 21:59:34 +00:00
|
|
|
throw new IllegalArgumentException(b.d.b.a.a.s("byteCount: ", j).toString());
|
2021-12-02 18:53:44 +00:00
|
|
|
} else if (this.k < j) {
|
2021-11-02 06:38:17 +00:00
|
|
|
throw new EOFException();
|
|
|
|
} else if (i == 0) {
|
|
|
|
return "";
|
|
|
|
} else {
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
int i2 = sVar.f3675b;
|
2022-03-07 09:34:54 +00:00
|
|
|
if (i2 + j > sVar.c) {
|
2021-11-05 06:48:17 +00:00
|
|
|
return new String(Z(j), charset);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
int i3 = (int) j;
|
|
|
|
String str = new String(sVar.a, i2, i3, charset);
|
2022-03-21 18:52:30 +00:00
|
|
|
int i4 = sVar.f3675b + i3;
|
|
|
|
sVar.f3675b = i4;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k -= j;
|
2021-12-17 21:59:34 +00:00
|
|
|
if (i4 == sVar.c) {
|
2021-12-02 18:53:44 +00:00
|
|
|
this.j = sVar.a();
|
2021-11-02 06:38:17 +00:00
|
|
|
t.a(sVar);
|
|
|
|
}
|
|
|
|
return str;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
2021-11-05 06:48:17 +00:00
|
|
|
public void B(e eVar, long j) throws EOFException {
|
|
|
|
m.checkParameterIsNotNull(eVar, "sink");
|
2021-12-02 18:53:44 +00:00
|
|
|
long j2 = this.k;
|
2021-11-05 06:48:17 +00:00
|
|
|
if (j2 >= j) {
|
|
|
|
eVar.write(this, j);
|
|
|
|
} else {
|
|
|
|
eVar.write(this, j2);
|
|
|
|
throw new EOFException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public String D() {
|
2021-12-02 18:53:44 +00:00
|
|
|
return A(this.k, c.a);
|
2021-11-05 06:48:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
|
|
|
public long E(ByteString byteString) {
|
2021-11-02 06:38:17 +00:00
|
|
|
m.checkParameterIsNotNull(byteString, "targetBytes");
|
2022-03-07 09:34:54 +00:00
|
|
|
return t(byteString, 0L);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // okio.BufferedSink
|
2021-11-05 06:48:17 +00:00
|
|
|
public BufferedSink F() {
|
2021-11-02 06:38:17 +00:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
2021-11-05 06:48:17 +00:00
|
|
|
public String G(long j) throws EOFException {
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j >= 0) {
|
|
|
|
long j2 = RecyclerView.FOREVER_NS;
|
|
|
|
if (j != RecyclerView.FOREVER_NS) {
|
|
|
|
j2 = j + 1;
|
|
|
|
}
|
|
|
|
byte b2 = (byte) 10;
|
2022-03-07 09:34:54 +00:00
|
|
|
long s2 = s(b2, 0L, j2);
|
2021-11-02 06:38:17 +00:00
|
|
|
if (s2 != -1) {
|
|
|
|
return g0.z.a.a(this, s2);
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
if (j2 < this.k && q(j2 - 1) == ((byte) 13) && q(j2) == b2) {
|
2021-11-02 06:38:17 +00:00
|
|
|
return g0.z.a.a(this, j2);
|
|
|
|
}
|
|
|
|
e eVar = new e();
|
2022-03-07 09:34:54 +00:00
|
|
|
n(eVar, 0L, Math.min(32, this.k));
|
2021-12-02 18:53:44 +00:00
|
|
|
throw new EOFException("\\n not found: limit=" + Math.min(this.k, j) + " content=" + eVar.x().k() + (char) 8230);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
throw new IllegalArgumentException(b.d.b.a.a.s("limit < 0: ", j).toString());
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public String H(long j) throws EOFException {
|
2021-11-05 06:48:17 +00:00
|
|
|
return A(j, c.a);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public int I() throws EOFException {
|
|
|
|
int i;
|
|
|
|
int i2;
|
|
|
|
int i3;
|
2021-12-02 18:53:44 +00:00
|
|
|
if (this.k != 0) {
|
2022-03-07 09:34:54 +00:00
|
|
|
byte q = q(0L);
|
2021-11-05 06:48:17 +00:00
|
|
|
if ((q & 128) == 0) {
|
|
|
|
i3 = q & Byte.MAX_VALUE;
|
2021-11-02 06:38:17 +00:00
|
|
|
i2 = 1;
|
|
|
|
i = 0;
|
2021-11-05 06:48:17 +00:00
|
|
|
} else if ((q & 224) == 192) {
|
|
|
|
i3 = q & 31;
|
2021-11-02 06:38:17 +00:00
|
|
|
i2 = 2;
|
|
|
|
i = 128;
|
2021-11-05 06:48:17 +00:00
|
|
|
} else if ((q & 240) == 224) {
|
|
|
|
i3 = q & 15;
|
2021-11-02 06:38:17 +00:00
|
|
|
i2 = 3;
|
|
|
|
i = 2048;
|
2021-11-05 06:48:17 +00:00
|
|
|
} else if ((q & 248) == 240) {
|
|
|
|
i3 = q & 7;
|
2021-11-02 06:38:17 +00:00
|
|
|
i2 = 4;
|
|
|
|
i = 65536;
|
|
|
|
} else {
|
2022-03-07 09:34:54 +00:00
|
|
|
skip(1L);
|
2021-11-02 06:38:17 +00:00
|
|
|
return 65533;
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
long j = i2;
|
2021-12-02 18:53:44 +00:00
|
|
|
if (this.k >= j) {
|
2021-11-02 06:38:17 +00:00
|
|
|
for (int i4 = 1; i4 < i2; i4++) {
|
2022-03-07 09:34:54 +00:00
|
|
|
long j2 = i4;
|
2021-11-05 06:48:17 +00:00
|
|
|
byte q2 = q(j2);
|
|
|
|
if ((q2 & 192) == 128) {
|
|
|
|
i3 = (i3 << 6) | (q2 & 63);
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
|
|
|
skip(j2);
|
|
|
|
return 65533;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
skip(j);
|
|
|
|
if (i3 > 1114111) {
|
|
|
|
return 65533;
|
|
|
|
}
|
|
|
|
if ((55296 <= i3 && 57343 >= i3) || i3 < i) {
|
|
|
|
return 65533;
|
|
|
|
}
|
|
|
|
return i3;
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
StringBuilder S = b.d.b.a.a.S("size < ", i2, ": ");
|
|
|
|
S.append(this.k);
|
|
|
|
S.append(" (to read code point prefixed 0x");
|
|
|
|
S.append(f.t1(q));
|
|
|
|
S.append(')');
|
|
|
|
throw new EOFException(S.toString());
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
throw new EOFException();
|
|
|
|
}
|
|
|
|
|
2021-11-05 06:48:17 +00:00
|
|
|
public final ByteString J(int i) {
|
2021-11-02 06:38:17 +00:00
|
|
|
if (i == 0) {
|
2021-12-02 18:53:44 +00:00
|
|
|
return ByteString.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
f.B(this.k, 0L, i);
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
int i2 = 0;
|
|
|
|
int i3 = 0;
|
|
|
|
int i4 = 0;
|
|
|
|
while (i3 < i) {
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
int i5 = sVar.c;
|
2022-03-21 18:52:30 +00:00
|
|
|
int i6 = sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (i5 != i6) {
|
|
|
|
i3 += i5 - i6;
|
|
|
|
i4++;
|
|
|
|
sVar = sVar.f;
|
|
|
|
} else {
|
|
|
|
throw new AssertionError("s.limit == s.pos");
|
|
|
|
}
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
byte[][] bArr = new byte[i4];
|
|
|
|
int[] iArr = new int[i4 * 2];
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar2 = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
int i7 = 0;
|
|
|
|
while (i2 < i) {
|
|
|
|
if (sVar2 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
bArr[i7] = sVar2.a;
|
2022-03-21 18:52:30 +00:00
|
|
|
i2 += sVar2.c - sVar2.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
iArr[i7] = Math.min(i2, i);
|
2022-03-21 18:52:30 +00:00
|
|
|
iArr[i7 + i4] = sVar2.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
sVar2.d = true;
|
|
|
|
i7++;
|
|
|
|
sVar2 = sVar2.f;
|
|
|
|
}
|
|
|
|
return new u(bArr, iArr);
|
|
|
|
}
|
|
|
|
|
2021-11-05 06:48:17 +00:00
|
|
|
@Override // okio.BufferedSink
|
|
|
|
public /* bridge */ /* synthetic */ BufferedSink K(String str) {
|
|
|
|
b0(str);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
|
|
|
public String M(Charset charset) {
|
|
|
|
m.checkParameterIsNotNull(charset, "charset");
|
2021-12-02 18:53:44 +00:00
|
|
|
return A(this.k, charset);
|
2021-11-05 06:48:17 +00:00
|
|
|
}
|
|
|
|
|
2021-11-02 06:38:17 +00:00
|
|
|
public final s N(int i) {
|
|
|
|
boolean z2 = true;
|
|
|
|
if (i < 1 || i > 8192) {
|
|
|
|
z2 = false;
|
|
|
|
}
|
|
|
|
if (z2) {
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
s b2 = t.b();
|
2021-12-02 18:53:44 +00:00
|
|
|
this.j = b2;
|
2021-11-02 06:38:17 +00:00
|
|
|
b2.g = b2;
|
|
|
|
b2.f = b2;
|
|
|
|
return b2;
|
|
|
|
}
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
s sVar2 = sVar.g;
|
|
|
|
if (sVar2 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
if (sVar2.c + i <= 8192 && sVar2.e) {
|
2021-11-02 06:38:17 +00:00
|
|
|
return sVar2;
|
|
|
|
}
|
|
|
|
s b3 = t.b();
|
|
|
|
sVar2.b(b3);
|
|
|
|
return b3;
|
|
|
|
}
|
|
|
|
throw new IllegalArgumentException("unexpected capacity".toString());
|
|
|
|
}
|
|
|
|
|
2021-11-05 06:48:17 +00:00
|
|
|
public e O(ByteString byteString) {
|
|
|
|
m.checkParameterIsNotNull(byteString, "byteString");
|
|
|
|
byteString.s(this, 0, byteString.j());
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-02 06:38:17 +00:00
|
|
|
@Override // okio.BufferedSink
|
2021-11-05 06:48:17 +00:00
|
|
|
public long P(x xVar) throws IOException {
|
2021-11-02 06:38:17 +00:00
|
|
|
m.checkParameterIsNotNull(xVar, "source");
|
|
|
|
long j = 0;
|
|
|
|
while (true) {
|
2022-03-07 09:34:54 +00:00
|
|
|
long i02 = xVar.i0(this, 8192);
|
2021-11-05 06:48:17 +00:00
|
|
|
if (i02 == -1) {
|
2021-11-02 06:38:17 +00:00
|
|
|
return j;
|
|
|
|
}
|
2021-11-05 06:48:17 +00:00
|
|
|
j += i02;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public e R(byte[] bArr) {
|
|
|
|
m.checkParameterIsNotNull(bArr, "source");
|
|
|
|
S(bArr, 0, bArr.length);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public e S(byte[] bArr, int i, int i2) {
|
|
|
|
m.checkParameterIsNotNull(bArr, "source");
|
2022-03-07 09:34:54 +00:00
|
|
|
long j = i2;
|
|
|
|
f.B(bArr.length, i, j);
|
2021-11-02 06:38:17 +00:00
|
|
|
int i3 = i2 + i;
|
|
|
|
while (i < i3) {
|
|
|
|
s N = N(1);
|
2021-12-17 21:59:34 +00:00
|
|
|
int min = Math.min(i3 - i, 8192 - N.c);
|
2021-11-02 06:38:17 +00:00
|
|
|
int i4 = i + min;
|
2021-12-17 21:59:34 +00:00
|
|
|
j.copyInto(bArr, N.a, N.c, i, i4);
|
|
|
|
N.c += min;
|
2021-11-02 06:38:17 +00:00
|
|
|
i = i4;
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k += j;
|
2021-11-02 06:38:17 +00:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public e T(int i) {
|
|
|
|
s N = N(1);
|
|
|
|
byte[] bArr = N.a;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i2 = N.c;
|
|
|
|
N.c = i2 + 1;
|
2021-11-02 06:38:17 +00:00
|
|
|
bArr[i2] = (byte) i;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k++;
|
2021-11-02 06:38:17 +00:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* renamed from: U */
|
2021-11-05 06:48:17 +00:00
|
|
|
public e q0(long j) {
|
2022-03-07 09:34:54 +00:00
|
|
|
int i = (j > 0L ? 1 : (j == 0L ? 0 : -1));
|
2021-11-02 06:38:17 +00:00
|
|
|
if (i == 0) {
|
|
|
|
T(48);
|
|
|
|
} else {
|
|
|
|
boolean z2 = false;
|
|
|
|
int i2 = 1;
|
|
|
|
if (i < 0) {
|
|
|
|
j = -j;
|
|
|
|
if (j < 0) {
|
|
|
|
b0("-9223372036854775808");
|
|
|
|
} else {
|
|
|
|
z2 = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (j >= 100000000) {
|
|
|
|
i2 = j < 1000000000000L ? j < 10000000000L ? j < 1000000000 ? 9 : 10 : j < 100000000000L ? 11 : 12 : j < 1000000000000000L ? j < 10000000000000L ? 13 : j < 100000000000000L ? 14 : 15 : j < 100000000000000000L ? j < 10000000000000000L ? 16 : 17 : j < 1000000000000000000L ? 18 : 19;
|
|
|
|
} else if (j >= 10000) {
|
|
|
|
i2 = j < 1000000 ? j < 100000 ? 5 : 6 : j < 10000000 ? 7 : 8;
|
|
|
|
} else if (j >= 100) {
|
|
|
|
i2 = j < 1000 ? 3 : 4;
|
|
|
|
} else if (j >= 10) {
|
|
|
|
i2 = 2;
|
|
|
|
}
|
|
|
|
if (z2) {
|
|
|
|
i2++;
|
|
|
|
}
|
|
|
|
s N = N(i2);
|
|
|
|
byte[] bArr = N.a;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i3 = N.c + i2;
|
2021-11-02 06:38:17 +00:00
|
|
|
while (j != 0) {
|
2022-03-07 09:34:54 +00:00
|
|
|
long j2 = 10;
|
2021-11-02 06:38:17 +00:00
|
|
|
i3--;
|
|
|
|
bArr[i3] = g0.z.a.a[(int) (j % j2)];
|
|
|
|
j /= j2;
|
|
|
|
}
|
|
|
|
if (z2) {
|
|
|
|
bArr[i3 - 1] = (byte) 45;
|
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
N.c += i2;
|
2022-03-07 09:34:54 +00:00
|
|
|
this.k += i2;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* renamed from: V */
|
2021-11-05 06:48:17 +00:00
|
|
|
public e Q(long j) {
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j == 0) {
|
|
|
|
T(48);
|
|
|
|
} else {
|
|
|
|
long j2 = (j >>> 1) | j;
|
|
|
|
long j3 = j2 | (j2 >>> 2);
|
|
|
|
long j4 = j3 | (j3 >>> 4);
|
|
|
|
long j5 = j4 | (j4 >>> 8);
|
|
|
|
long j6 = j5 | (j5 >>> 16);
|
|
|
|
long j7 = j6 | (j6 >>> 32);
|
|
|
|
long j8 = j7 - ((j7 >>> 1) & 6148914691236517205L);
|
|
|
|
long j9 = ((j8 >>> 2) & 3689348814741910323L) + (j8 & 3689348814741910323L);
|
|
|
|
long j10 = ((j9 >>> 4) + j9) & 1085102592571150095L;
|
|
|
|
long j11 = j10 + (j10 >>> 8);
|
|
|
|
long j12 = j11 + (j11 >>> 16);
|
2022-03-07 09:34:54 +00:00
|
|
|
int i = (int) ((((j12 & 63) + ((j12 >>> 32) & 63)) + 3) / 4);
|
2021-11-02 06:38:17 +00:00
|
|
|
s N = N(i);
|
|
|
|
byte[] bArr = N.a;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i2 = N.c;
|
2021-11-02 06:38:17 +00:00
|
|
|
for (int i3 = (i2 + i) - 1; i3 >= i2; i3--) {
|
|
|
|
bArr[i3] = g0.z.a.a[(int) (15 & j)];
|
|
|
|
j >>>= 4;
|
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
N.c += i;
|
2022-03-07 09:34:54 +00:00
|
|
|
this.k += i;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public e W(int i) {
|
|
|
|
s N = N(4);
|
|
|
|
byte[] bArr = N.a;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i2 = N.c;
|
2021-11-02 06:38:17 +00:00
|
|
|
int i3 = i2 + 1;
|
|
|
|
bArr[i2] = (byte) ((i >>> 24) & 255);
|
|
|
|
int i4 = i3 + 1;
|
|
|
|
bArr[i3] = (byte) ((i >>> 16) & 255);
|
|
|
|
int i5 = i4 + 1;
|
|
|
|
bArr[i4] = (byte) ((i >>> 8) & 255);
|
|
|
|
bArr[i5] = (byte) (i & 255);
|
2021-12-17 21:59:34 +00:00
|
|
|
N.c = i5 + 1;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k += 4;
|
2021-11-02 06:38:17 +00:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-05 06:48:17 +00:00
|
|
|
public e X(int i) {
|
|
|
|
s N = N(2);
|
|
|
|
byte[] bArr = N.a;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i2 = N.c;
|
2021-11-05 06:48:17 +00:00
|
|
|
int i3 = i2 + 1;
|
|
|
|
bArr[i2] = (byte) ((i >>> 8) & 255);
|
|
|
|
bArr[i3] = (byte) (i & 255);
|
2021-12-17 21:59:34 +00:00
|
|
|
N.c = i3 + 1;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k += 2;
|
2021-11-05 06:48:17 +00:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-02 06:38:17 +00:00
|
|
|
@Override // g0.g
|
2021-11-05 06:48:17 +00:00
|
|
|
public String Y() throws EOFException {
|
|
|
|
return G(RecyclerView.FOREVER_NS);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
2021-11-05 06:48:17 +00:00
|
|
|
public byte[] Z(long j) throws EOFException {
|
2021-11-02 06:38:17 +00:00
|
|
|
if (!(j >= 0 && j <= ((long) Integer.MAX_VALUE))) {
|
2021-12-17 21:59:34 +00:00
|
|
|
throw new IllegalArgumentException(b.d.b.a.a.s("byteCount: ", j).toString());
|
2021-12-02 18:53:44 +00:00
|
|
|
} else if (this.k >= j) {
|
2022-03-07 09:34:54 +00:00
|
|
|
byte[] bArr = new byte[(int) j];
|
2021-11-02 06:38:17 +00:00
|
|
|
readFully(bArr);
|
|
|
|
return bArr;
|
|
|
|
} else {
|
|
|
|
throw new EOFException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* renamed from: b */
|
|
|
|
public e clone() {
|
|
|
|
e eVar = new e();
|
2021-12-02 18:53:44 +00:00
|
|
|
if (this.k != 0) {
|
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
s c = sVar.c();
|
|
|
|
eVar.j = c;
|
|
|
|
c.g = c;
|
|
|
|
c.f = c;
|
2021-11-02 06:38:17 +00:00
|
|
|
for (s sVar2 = sVar.f; sVar2 != sVar; sVar2 = sVar2.f) {
|
2021-12-17 21:59:34 +00:00
|
|
|
s sVar3 = c.g;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar3 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
if (sVar2 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
sVar3.b(sVar2.c());
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
eVar.k = this.k;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
return eVar;
|
|
|
|
}
|
|
|
|
|
|
|
|
public e b0(String str) {
|
|
|
|
m.checkParameterIsNotNull(str, "string");
|
|
|
|
c0(str, 0, str.length());
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public e c0(String str, int i, int i2) {
|
|
|
|
char charAt;
|
|
|
|
m.checkParameterIsNotNull(str, "string");
|
|
|
|
if (i >= 0) {
|
|
|
|
if (i2 >= i) {
|
|
|
|
if (i2 <= str.length()) {
|
|
|
|
while (i < i2) {
|
|
|
|
char charAt2 = str.charAt(i);
|
|
|
|
if (charAt2 < 128) {
|
|
|
|
s N = N(1);
|
|
|
|
byte[] bArr = N.a;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i3 = N.c - i;
|
2021-11-02 06:38:17 +00:00
|
|
|
int min = Math.min(i2, 8192 - i3);
|
2022-03-07 09:34:54 +00:00
|
|
|
i++;
|
2021-11-02 06:38:17 +00:00
|
|
|
bArr[i + i3] = (byte) charAt2;
|
2022-03-07 09:34:54 +00:00
|
|
|
while (i < min && (charAt = str.charAt(i)) < 128) {
|
|
|
|
i++;
|
2021-11-02 06:38:17 +00:00
|
|
|
bArr[i + i3] = (byte) charAt;
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
int i4 = N.c;
|
|
|
|
int i5 = (i3 + i) - i4;
|
|
|
|
N.c = i4 + i5;
|
|
|
|
this.k += i5;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
|
|
|
if (charAt2 < 2048) {
|
|
|
|
s N2 = N(2);
|
|
|
|
byte[] bArr2 = N2.a;
|
2022-03-07 09:34:54 +00:00
|
|
|
int i6 = N2.c;
|
|
|
|
bArr2[i6] = (byte) ((charAt2 >> 6) | Opcodes.CHECKCAST);
|
|
|
|
bArr2[i6 + 1] = (byte) ((charAt2 & '?') | 128);
|
|
|
|
N2.c = i6 + 2;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k += 2;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else if (charAt2 < 55296 || charAt2 > 57343) {
|
|
|
|
s N3 = N(3);
|
|
|
|
byte[] bArr3 = N3.a;
|
2022-03-07 09:34:54 +00:00
|
|
|
int i7 = N3.c;
|
|
|
|
bArr3[i7] = (byte) ((charAt2 >> '\f') | 224);
|
|
|
|
bArr3[i7 + 1] = (byte) ((63 & (charAt2 >> 6)) | 128);
|
|
|
|
bArr3[i7 + 2] = (byte) ((charAt2 & '?') | 128);
|
|
|
|
N3.c = i7 + 3;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k += 3;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
2022-03-07 09:34:54 +00:00
|
|
|
int i8 = i + 1;
|
|
|
|
char charAt3 = i8 < i2 ? str.charAt(i8) : (char) 0;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (charAt2 > 56319 || 56320 > charAt3 || 57343 < charAt3) {
|
|
|
|
T(63);
|
2022-03-07 09:34:54 +00:00
|
|
|
i = i8;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
2022-03-07 09:34:54 +00:00
|
|
|
int i9 = (((charAt2 & 1023) << 10) | (charAt3 & 1023)) + 65536;
|
2021-11-02 06:38:17 +00:00
|
|
|
s N4 = N(4);
|
|
|
|
byte[] bArr4 = N4.a;
|
2022-03-07 09:34:54 +00:00
|
|
|
int i10 = N4.c;
|
|
|
|
bArr4[i10] = (byte) ((i9 >> 18) | 240);
|
|
|
|
bArr4[i10 + 1] = (byte) (((i9 >> 12) & 63) | 128);
|
|
|
|
bArr4[i10 + 2] = (byte) (((i9 >> 6) & 63) | 128);
|
|
|
|
bArr4[i10 + 3] = (byte) ((i9 & 63) | 128);
|
|
|
|
N4.c = i10 + 4;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k += 4;
|
2021-11-02 06:38:17 +00:00
|
|
|
i += 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
StringBuilder S = b.d.b.a.a.S("endIndex > string.length: ", i2, " > ");
|
|
|
|
S.append(str.length());
|
|
|
|
throw new IllegalArgumentException(S.toString().toString());
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
throw new IllegalArgumentException(b.d.b.a.a.r("endIndex < beginIndex: ", i2, " < ", i).toString());
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
throw new IllegalArgumentException(b.d.b.a.a.p("beginIndex < 0: ", i).toString());
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.x, java.io.Closeable, java.lang.AutoCloseable
|
|
|
|
public void close() {
|
|
|
|
}
|
|
|
|
|
2021-11-05 06:48:17 +00:00
|
|
|
public e d0(int i) {
|
2021-11-02 06:38:17 +00:00
|
|
|
String str;
|
|
|
|
if (i < 128) {
|
|
|
|
T(i);
|
|
|
|
} else if (i < 2048) {
|
|
|
|
s N = N(2);
|
|
|
|
byte[] bArr = N.a;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i2 = N.c;
|
2022-03-07 09:34:54 +00:00
|
|
|
bArr[i2] = (byte) ((i >> 6) | Opcodes.CHECKCAST);
|
2021-11-02 06:38:17 +00:00
|
|
|
bArr[i2 + 1] = (byte) ((i & 63) | 128);
|
2021-12-17 21:59:34 +00:00
|
|
|
N.c = i2 + 2;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k += 2;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else if (55296 <= i && 57343 >= i) {
|
|
|
|
T(63);
|
|
|
|
} else if (i < 65536) {
|
|
|
|
s N2 = N(3);
|
|
|
|
byte[] bArr2 = N2.a;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i3 = N2.c;
|
2021-11-02 06:38:17 +00:00
|
|
|
bArr2[i3] = (byte) ((i >> 12) | 224);
|
|
|
|
bArr2[i3 + 1] = (byte) (((i >> 6) & 63) | 128);
|
|
|
|
bArr2[i3 + 2] = (byte) ((i & 63) | 128);
|
2021-12-17 21:59:34 +00:00
|
|
|
N2.c = i3 + 3;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k += 3;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else if (i <= 1114111) {
|
|
|
|
s N3 = N(4);
|
|
|
|
byte[] bArr3 = N3.a;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i4 = N3.c;
|
2021-11-02 06:38:17 +00:00
|
|
|
bArr3[i4] = (byte) ((i >> 18) | 240);
|
|
|
|
bArr3[i4 + 1] = (byte) (((i >> 12) & 63) | 128);
|
|
|
|
bArr3[i4 + 2] = (byte) (((i >> 6) & 63) | 128);
|
|
|
|
bArr3[i4 + 3] = (byte) ((i & 63) | 128);
|
2021-12-17 21:59:34 +00:00
|
|
|
N3.c = i4 + 4;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k += 4;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
2022-03-21 18:52:30 +00:00
|
|
|
StringBuilder R = b.d.b.a.a.R("Unexpected code point: 0x");
|
2021-11-02 06:38:17 +00:00
|
|
|
if (i != 0) {
|
|
|
|
char[] cArr = g0.z.b.a;
|
|
|
|
int i5 = 0;
|
|
|
|
char[] cArr2 = {cArr[(i >> 28) & 15], cArr[(i >> 24) & 15], cArr[(i >> 20) & 15], cArr[(i >> 16) & 15], cArr[(i >> 12) & 15], cArr[(i >> 8) & 15], cArr[(i >> 4) & 15], cArr[i & 15]};
|
|
|
|
while (i5 < 8 && cArr2[i5] == '0') {
|
|
|
|
i5++;
|
|
|
|
}
|
|
|
|
str = new String(cArr2, i5, 8 - i5);
|
|
|
|
} else {
|
|
|
|
str = "0";
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
R.append(str);
|
|
|
|
throw new IllegalArgumentException(R.toString());
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-05 06:48:17 +00:00
|
|
|
@Override // okio.BufferedSink
|
|
|
|
public /* bridge */ /* synthetic */ BufferedSink e0(ByteString byteString) {
|
|
|
|
O(byteString);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-02 06:38:17 +00:00
|
|
|
public boolean equals(Object obj) {
|
|
|
|
if (this != obj) {
|
|
|
|
if (!(obj instanceof e)) {
|
|
|
|
return false;
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
long j = this.k;
|
2021-11-02 06:38:17 +00:00
|
|
|
e eVar = (e) obj;
|
2021-12-02 18:53:44 +00:00
|
|
|
if (j != eVar.k) {
|
2021-11-02 06:38:17 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
if (j != 0) {
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar2 = eVar.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar2 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
int i = sVar.f3675b;
|
|
|
|
int i2 = sVar2.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
long j2 = 0;
|
2021-12-02 18:53:44 +00:00
|
|
|
while (j2 < this.k) {
|
2022-03-07 09:34:54 +00:00
|
|
|
long min = Math.min(sVar.c - i, sVar2.c - i2);
|
|
|
|
for (long j3 = 0; j3 < min; j3++) {
|
|
|
|
i++;
|
|
|
|
i2++;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar.a[i] != sVar2.a[i2]) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
if (i == sVar.c) {
|
2021-11-02 06:38:17 +00:00
|
|
|
sVar = sVar.f;
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
i = sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
if (i2 == sVar2.c) {
|
2021-11-02 06:38:17 +00:00
|
|
|
sVar2 = sVar2.f;
|
|
|
|
if (sVar2 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
i2 = sVar2.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
j2 += min;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final long f() {
|
2021-12-02 18:53:44 +00:00
|
|
|
long j = this.k;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j == 0) {
|
2022-03-07 09:34:54 +00:00
|
|
|
return 0L;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
s sVar2 = sVar.g;
|
|
|
|
if (sVar2 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
int i = sVar2.c;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (i < 8192 && sVar2.e) {
|
2022-03-21 18:52:30 +00:00
|
|
|
j -= i - sVar2.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
return j;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // okio.BufferedSink, g0.v, java.io.Flushable
|
|
|
|
public void flush() {
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g, okio.BufferedSink
|
|
|
|
public e g() {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int hashCode() {
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
int i = 1;
|
|
|
|
do {
|
2021-12-17 21:59:34 +00:00
|
|
|
int i2 = sVar.c;
|
2022-03-21 18:52:30 +00:00
|
|
|
for (int i3 = sVar.f3675b; i3 < i2; i3++) {
|
2021-11-02 06:38:17 +00:00
|
|
|
i = (i * 31) + sVar.a[i3];
|
|
|
|
}
|
|
|
|
sVar = sVar.f;
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
} while (sVar != this.j);
|
2021-11-02 06:38:17 +00:00
|
|
|
return i;
|
|
|
|
}
|
|
|
|
|
2021-11-05 06:48:17 +00:00
|
|
|
@Override // g0.x
|
|
|
|
public long i0(e eVar, long j) {
|
|
|
|
m.checkParameterIsNotNull(eVar, "sink");
|
|
|
|
if (j >= 0) {
|
2021-12-02 18:53:44 +00:00
|
|
|
long j2 = this.k;
|
2021-11-05 06:48:17 +00:00
|
|
|
if (j2 == 0) {
|
2022-03-07 09:34:54 +00:00
|
|
|
return -1L;
|
2021-11-05 06:48:17 +00:00
|
|
|
}
|
|
|
|
if (j > j2) {
|
|
|
|
j = j2;
|
|
|
|
}
|
|
|
|
eVar.write(this, j);
|
|
|
|
return j;
|
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
throw new IllegalArgumentException(b.d.b.a.a.s("byteCount < 0: ", j).toString());
|
2021-11-05 06:48:17 +00:00
|
|
|
}
|
|
|
|
|
2021-11-02 06:38:17 +00:00
|
|
|
@Override // java.nio.channels.Channel
|
|
|
|
public boolean isOpen() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
|
|
|
public boolean j(long j) {
|
2021-12-02 18:53:44 +00:00
|
|
|
return this.k >= j;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
2021-11-05 06:48:17 +00:00
|
|
|
public long k0(v vVar) throws IOException {
|
2021-11-02 06:38:17 +00:00
|
|
|
m.checkParameterIsNotNull(vVar, "sink");
|
2021-12-02 18:53:44 +00:00
|
|
|
long j = this.k;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j > 0) {
|
|
|
|
vVar.write(this, j);
|
|
|
|
}
|
|
|
|
return j;
|
|
|
|
}
|
|
|
|
|
2021-11-05 06:48:17 +00:00
|
|
|
public final e n(e eVar, long j, long j2) {
|
2021-11-02 06:38:17 +00:00
|
|
|
m.checkParameterIsNotNull(eVar, "out");
|
2022-01-13 08:07:50 +00:00
|
|
|
f.B(this.k, j, j2);
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j2 != 0) {
|
2021-12-02 18:53:44 +00:00
|
|
|
eVar.k += j2;
|
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
while (true) {
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
int i = sVar.c;
|
2022-03-21 18:52:30 +00:00
|
|
|
int i2 = sVar.f3675b;
|
2022-03-07 09:34:54 +00:00
|
|
|
if (j >= i - i2) {
|
|
|
|
j -= i - i2;
|
|
|
|
sVar = sVar.f;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
while (j2 > 0) {
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
s c = sVar.c();
|
2022-03-21 18:52:30 +00:00
|
|
|
int i3 = c.f3675b + ((int) j);
|
|
|
|
c.f3675b = i3;
|
2021-12-17 21:59:34 +00:00
|
|
|
c.c = Math.min(i3 + ((int) j2), c.c);
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar2 = eVar.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar2 == null) {
|
2021-12-17 21:59:34 +00:00
|
|
|
c.g = c;
|
|
|
|
c.f = c;
|
|
|
|
eVar.j = c;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
|
|
|
if (sVar2 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
s sVar3 = sVar2.g;
|
|
|
|
if (sVar3 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
sVar3.b(c);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
j2 -= c.c - c.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
sVar = sVar.f;
|
|
|
|
j = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2021-11-05 06:48:17 +00:00
|
|
|
@Override // g0.g
|
|
|
|
public ByteString o(long j) throws EOFException {
|
|
|
|
if (!(j >= 0 && j <= ((long) Integer.MAX_VALUE))) {
|
2021-12-17 21:59:34 +00:00
|
|
|
throw new IllegalArgumentException(b.d.b.a.a.s("byteCount: ", j).toString());
|
2021-12-02 18:53:44 +00:00
|
|
|
} else if (this.k < j) {
|
2021-11-05 06:48:17 +00:00
|
|
|
throw new EOFException();
|
2022-03-07 09:34:54 +00:00
|
|
|
} else if (j < 4096) {
|
2021-11-05 06:48:17 +00:00
|
|
|
return new ByteString(Z(j));
|
|
|
|
} else {
|
|
|
|
ByteString J = J((int) j);
|
|
|
|
skip(j);
|
|
|
|
return J;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // okio.BufferedSink
|
|
|
|
public BufferedSink p() {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
|
|
|
public void p0(long j) throws EOFException {
|
2021-12-02 18:53:44 +00:00
|
|
|
if (this.k < j) {
|
2021-11-05 06:48:17 +00:00
|
|
|
throw new EOFException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public final byte q(long j) {
|
2022-03-07 09:34:54 +00:00
|
|
|
f.B(this.k, j, 1L);
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar != null) {
|
2021-12-02 18:53:44 +00:00
|
|
|
long j2 = this.k;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j2 - j < j) {
|
|
|
|
while (j2 > j) {
|
|
|
|
sVar = sVar.g;
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
j2 -= sVar.c - sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
return sVar.a[(int) ((sVar.f3675b + j) - j2)];
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
long j3 = 0;
|
|
|
|
while (true) {
|
2021-12-17 21:59:34 +00:00
|
|
|
int i = sVar.c;
|
2022-03-21 18:52:30 +00:00
|
|
|
int i2 = sVar.f3675b;
|
2022-03-07 09:34:54 +00:00
|
|
|
long j4 = (i - i2) + j3;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j4 > j) {
|
2022-03-07 09:34:54 +00:00
|
|
|
return sVar.a[(int) ((i2 + j) - j3)];
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
sVar = sVar.f;
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
j3 = j4;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
m.throwNpe();
|
|
|
|
throw null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // java.nio.channels.ReadableByteChannel
|
|
|
|
public int read(ByteBuffer byteBuffer) throws IOException {
|
|
|
|
m.checkParameterIsNotNull(byteBuffer, "sink");
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
return -1;
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
int min = Math.min(byteBuffer.remaining(), sVar.c - sVar.f3675b);
|
|
|
|
byteBuffer.put(sVar.a, sVar.f3675b, min);
|
|
|
|
int i = sVar.f3675b + min;
|
|
|
|
sVar.f3675b = i;
|
2022-03-07 09:34:54 +00:00
|
|
|
this.k -= min;
|
2021-12-17 21:59:34 +00:00
|
|
|
if (i == sVar.c) {
|
2021-12-02 18:53:44 +00:00
|
|
|
this.j = sVar.a();
|
2021-11-02 06:38:17 +00:00
|
|
|
t.a(sVar);
|
|
|
|
}
|
|
|
|
return min;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int read(byte[] bArr, int i, int i2) {
|
|
|
|
m.checkParameterIsNotNull(bArr, "sink");
|
2022-03-07 09:34:54 +00:00
|
|
|
f.B(bArr.length, i, i2);
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
return -1;
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
int min = Math.min(i2, sVar.c - sVar.f3675b);
|
2021-11-02 06:38:17 +00:00
|
|
|
byte[] bArr2 = sVar.a;
|
2022-03-21 18:52:30 +00:00
|
|
|
int i3 = sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
j.copyInto(bArr2, bArr, i, i3, i3 + min);
|
2022-03-21 18:52:30 +00:00
|
|
|
int i4 = sVar.f3675b + min;
|
|
|
|
sVar.f3675b = i4;
|
2022-03-07 09:34:54 +00:00
|
|
|
this.k -= min;
|
2021-12-17 21:59:34 +00:00
|
|
|
if (i4 != sVar.c) {
|
2021-11-02 06:38:17 +00:00
|
|
|
return min;
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
this.j = sVar.a();
|
2021-11-02 06:38:17 +00:00
|
|
|
t.a(sVar);
|
|
|
|
return min;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
|
|
|
public byte readByte() throws EOFException {
|
2021-12-02 18:53:44 +00:00
|
|
|
if (this.k != 0) {
|
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
int i = sVar.f3675b;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i2 = sVar.c;
|
2021-11-02 06:38:17 +00:00
|
|
|
int i3 = i + 1;
|
|
|
|
byte b2 = sVar.a[i];
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k--;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (i3 == i2) {
|
2021-12-02 18:53:44 +00:00
|
|
|
this.j = sVar.a();
|
2021-11-02 06:38:17 +00:00
|
|
|
t.a(sVar);
|
|
|
|
} else {
|
2022-03-21 18:52:30 +00:00
|
|
|
sVar.f3675b = i3;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
return b2;
|
|
|
|
}
|
|
|
|
throw new EOFException();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
|
|
|
public void readFully(byte[] bArr) throws EOFException {
|
|
|
|
m.checkParameterIsNotNull(bArr, "sink");
|
|
|
|
int i = 0;
|
|
|
|
while (i < bArr.length) {
|
|
|
|
int read = read(bArr, i, bArr.length - i);
|
|
|
|
if (read != -1) {
|
|
|
|
i += read;
|
|
|
|
} else {
|
|
|
|
throw new EOFException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
|
|
|
public int readInt() throws EOFException {
|
2021-12-02 18:53:44 +00:00
|
|
|
if (this.k >= 4) {
|
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
int i = sVar.f3675b;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i2 = sVar.c;
|
2022-03-07 09:34:54 +00:00
|
|
|
if (i2 - i < 4) {
|
2021-11-02 06:38:17 +00:00
|
|
|
return ((readByte() & 255) << 24) | ((readByte() & 255) << 16) | ((readByte() & 255) << 8) | (readByte() & 255);
|
|
|
|
}
|
|
|
|
byte[] bArr = sVar.a;
|
|
|
|
int i3 = i + 1;
|
|
|
|
int i4 = i3 + 1;
|
|
|
|
int i5 = ((bArr[i] & 255) << 24) | ((bArr[i3] & 255) << 16);
|
|
|
|
int i6 = i4 + 1;
|
|
|
|
int i7 = i5 | ((bArr[i4] & 255) << 8);
|
|
|
|
int i8 = i6 + 1;
|
|
|
|
int i9 = i7 | (bArr[i6] & 255);
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k -= 4;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (i8 == i2) {
|
2021-12-02 18:53:44 +00:00
|
|
|
this.j = sVar.a();
|
2021-11-02 06:38:17 +00:00
|
|
|
t.a(sVar);
|
|
|
|
} else {
|
2022-03-21 18:52:30 +00:00
|
|
|
sVar.f3675b = i8;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
return i9;
|
|
|
|
}
|
|
|
|
throw new EOFException();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
|
|
|
public long readLong() throws EOFException {
|
2022-03-07 09:34:54 +00:00
|
|
|
int i;
|
|
|
|
int i2;
|
|
|
|
int i3;
|
|
|
|
int i4;
|
|
|
|
int i5;
|
|
|
|
int i6;
|
2021-12-02 18:53:44 +00:00
|
|
|
if (this.k >= 8) {
|
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
int i7 = sVar.f3675b;
|
2022-03-07 09:34:54 +00:00
|
|
|
int i8 = sVar.c;
|
|
|
|
if (i8 - i7 < 8) {
|
|
|
|
return ((readInt() & 4294967295L) << 32) | (4294967295L & readInt());
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
byte[] bArr = sVar.a;
|
2022-03-07 09:34:54 +00:00
|
|
|
long j = ((bArr[i7] & 255) << 56) | ((bArr[i] & 255) << 48) | ((bArr[i2] & 255) << 40);
|
|
|
|
int i9 = i7 + 1 + 1 + 1 + 1;
|
|
|
|
long j2 = ((bArr[i3] & 255) << 32) | j;
|
|
|
|
long j3 = j2 | ((bArr[i9] & 255) << 24) | ((bArr[i4] & 255) << 16);
|
|
|
|
int i10 = i9 + 1 + 1 + 1 + 1;
|
|
|
|
long j4 = j3 | ((bArr[i5] & 255) << 8) | (bArr[i6] & 255);
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k -= 8;
|
2022-03-07 09:34:54 +00:00
|
|
|
if (i10 == i8) {
|
2021-12-02 18:53:44 +00:00
|
|
|
this.j = sVar.a();
|
2021-11-02 06:38:17 +00:00
|
|
|
t.a(sVar);
|
|
|
|
} else {
|
2022-03-21 18:52:30 +00:00
|
|
|
sVar.f3675b = i10;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
return j4;
|
|
|
|
}
|
|
|
|
throw new EOFException();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
|
|
|
public short readShort() throws EOFException {
|
2021-12-02 18:53:44 +00:00
|
|
|
if (this.k >= 2) {
|
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
int i = sVar.f3675b;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i2 = sVar.c;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (i2 - i < 2) {
|
|
|
|
return (short) (((readByte() & 255) << 8) | (readByte() & 255));
|
|
|
|
}
|
|
|
|
byte[] bArr = sVar.a;
|
|
|
|
int i3 = i + 1;
|
|
|
|
int i4 = i3 + 1;
|
|
|
|
int i5 = ((bArr[i] & 255) << 8) | (bArr[i3] & 255);
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k -= 2;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (i4 == i2) {
|
2021-12-02 18:53:44 +00:00
|
|
|
this.j = sVar.a();
|
2021-11-02 06:38:17 +00:00
|
|
|
t.a(sVar);
|
|
|
|
} else {
|
2022-03-21 18:52:30 +00:00
|
|
|
sVar.f3675b = i4;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
return (short) i5;
|
|
|
|
}
|
|
|
|
throw new EOFException();
|
|
|
|
}
|
|
|
|
|
|
|
|
public long s(byte b2, long j, long j2) {
|
|
|
|
s sVar;
|
|
|
|
long j3 = 0;
|
|
|
|
if (0 <= j && j2 >= j) {
|
2021-12-02 18:53:44 +00:00
|
|
|
long j4 = this.k;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j2 > j4) {
|
|
|
|
j2 = j4;
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
if (!(j == j2 || (sVar = this.j) == null)) {
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j4 - j < j) {
|
|
|
|
while (j4 > j) {
|
|
|
|
sVar = sVar.g;
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
j4 -= sVar.c - sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
while (j4 < j2) {
|
|
|
|
byte[] bArr = sVar.a;
|
2022-03-21 18:52:30 +00:00
|
|
|
int min = (int) Math.min(sVar.c, (sVar.f3675b + j2) - j4);
|
|
|
|
for (int i = (int) ((sVar.f3675b + j) - j4); i < min; i++) {
|
2021-11-02 06:38:17 +00:00
|
|
|
if (bArr[i] == b2) {
|
2022-03-21 18:52:30 +00:00
|
|
|
return (i - sVar.f3675b) + j4;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
j4 += sVar.c - sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
sVar = sVar.f;
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
j = j4;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
while (true) {
|
2022-03-21 18:52:30 +00:00
|
|
|
long j5 = (sVar.c - sVar.f3675b) + j3;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j5 > j) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
sVar = sVar.f;
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
j3 = j5;
|
|
|
|
}
|
|
|
|
while (j3 < j2) {
|
|
|
|
byte[] bArr2 = sVar.a;
|
2022-03-21 18:52:30 +00:00
|
|
|
int min2 = (int) Math.min(sVar.c, (sVar.f3675b + j2) - j3);
|
|
|
|
for (int i2 = (int) ((sVar.f3675b + j) - j3); i2 < min2; i2++) {
|
2021-11-02 06:38:17 +00:00
|
|
|
if (bArr2[i2] == b2) {
|
2022-03-21 18:52:30 +00:00
|
|
|
return (i2 - sVar.f3675b) + j3;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
j3 += sVar.c - sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
sVar = sVar.f;
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
j = j3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
return -1L;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
StringBuilder R = b.d.b.a.a.R("size=");
|
|
|
|
R.append(this.k);
|
|
|
|
R.append(" fromIndex=");
|
|
|
|
R.append(j);
|
|
|
|
R.append(" toIndex=");
|
|
|
|
R.append(j2);
|
|
|
|
throw new IllegalArgumentException(R.toString().toString());
|
2021-11-05 06:48:17 +00:00
|
|
|
}
|
|
|
|
|
2022-03-07 09:34:54 +00:00
|
|
|
/* JADX WARN: Removed duplicated region for block: B:34:0x0091 */
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:35:0x009b */
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:37:0x009f */
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:44:0x00a3 A[EDGE_INSN: B:44:0x00a3->B:39:0x00a3 ?: BREAK , SYNTHETIC] */
|
2021-11-05 06:48:17 +00:00
|
|
|
@Override // g0.g
|
2022-03-07 09:34:54 +00:00
|
|
|
/*
|
|
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
|
|
*/
|
2021-11-05 06:48:17 +00:00
|
|
|
public long s0() throws EOFException {
|
|
|
|
int i;
|
2021-12-02 18:53:44 +00:00
|
|
|
if (this.k != 0) {
|
2021-11-05 06:48:17 +00:00
|
|
|
int i2 = 0;
|
|
|
|
boolean z2 = false;
|
|
|
|
long j = 0;
|
|
|
|
do {
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar = this.j;
|
2021-11-05 06:48:17 +00:00
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
byte[] bArr = sVar.a;
|
2022-03-21 18:52:30 +00:00
|
|
|
int i3 = sVar.f3675b;
|
2021-12-17 21:59:34 +00:00
|
|
|
int i4 = sVar.c;
|
2022-03-07 09:34:54 +00:00
|
|
|
while (i3 < i4) {
|
|
|
|
byte b2 = bArr[i3];
|
2021-11-05 06:48:17 +00:00
|
|
|
byte b3 = (byte) 48;
|
|
|
|
if (b2 < b3 || b2 > ((byte) 57)) {
|
|
|
|
byte b4 = (byte) 97;
|
2022-03-07 09:34:54 +00:00
|
|
|
if ((b2 >= b4 && b2 <= ((byte) 102)) || (b2 >= (b4 = (byte) 65) && b2 <= ((byte) 70))) {
|
|
|
|
i = (b2 - b4) + 10;
|
|
|
|
} else if (i2 != 0) {
|
|
|
|
z2 = true;
|
|
|
|
if (i3 != i4) {
|
|
|
|
this.j = sVar.a();
|
|
|
|
t.a(sVar);
|
|
|
|
} else {
|
2022-03-21 18:52:30 +00:00
|
|
|
sVar.f3675b = i3;
|
2022-03-07 09:34:54 +00:00
|
|
|
}
|
|
|
|
if (!z2) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
} else {
|
2022-03-21 18:52:30 +00:00
|
|
|
StringBuilder R = b.d.b.a.a.R("Expected leading [0-9a-fA-F] character but was 0x");
|
|
|
|
R.append(f.t1(b2));
|
|
|
|
throw new NumberFormatException(R.toString());
|
2021-11-05 06:48:17 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
i = b2 - b3;
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
if (((-1152921504606846976L) & j) == 0) {
|
|
|
|
j = (j << 4) | i;
|
2021-11-05 06:48:17 +00:00
|
|
|
i3++;
|
|
|
|
i2++;
|
|
|
|
} else {
|
|
|
|
e eVar = new e();
|
|
|
|
eVar.Q(j);
|
|
|
|
eVar.T(b2);
|
2022-03-21 18:52:30 +00:00
|
|
|
StringBuilder R2 = b.d.b.a.a.R("Number too large: ");
|
|
|
|
R2.append(eVar.D());
|
|
|
|
throw new NumberFormatException(R2.toString());
|
2021-11-05 06:48:17 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
if (i3 != i4) {
|
|
|
|
}
|
|
|
|
if (!z2) {
|
2021-11-05 06:48:17 +00:00
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
} while (this.j != null);
|
2022-03-07 09:34:54 +00:00
|
|
|
this.k -= i2;
|
2021-11-05 06:48:17 +00:00
|
|
|
return j;
|
|
|
|
}
|
|
|
|
throw new EOFException();
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
|
|
|
public void skip(long j) throws EOFException {
|
|
|
|
while (j > 0) {
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar != null) {
|
2022-03-21 18:52:30 +00:00
|
|
|
int min = (int) Math.min(j, sVar.c - sVar.f3675b);
|
2022-03-07 09:34:54 +00:00
|
|
|
long j2 = min;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.k -= j2;
|
2021-11-02 06:38:17 +00:00
|
|
|
j -= j2;
|
2022-03-21 18:52:30 +00:00
|
|
|
int i = sVar.f3675b + min;
|
|
|
|
sVar.f3675b = i;
|
2021-12-17 21:59:34 +00:00
|
|
|
if (i == sVar.c) {
|
2021-12-02 18:53:44 +00:00
|
|
|
this.j = sVar.a();
|
2021-11-02 06:38:17 +00:00
|
|
|
t.a(sVar);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
throw new EOFException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public long t(ByteString byteString, long j) {
|
|
|
|
int i;
|
|
|
|
int i2;
|
|
|
|
int i3;
|
|
|
|
int i4;
|
|
|
|
long j2 = j;
|
|
|
|
m.checkParameterIsNotNull(byteString, "targetBytes");
|
|
|
|
long j3 = 0;
|
|
|
|
if (j2 >= 0) {
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar == null) {
|
2022-03-07 09:34:54 +00:00
|
|
|
return -1L;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
long j4 = this.k;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j4 - j2 < j2) {
|
|
|
|
while (j4 > j2) {
|
|
|
|
sVar = sVar.g;
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
j4 -= sVar.c - sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
if (byteString.j() == 2) {
|
|
|
|
byte m = byteString.m(0);
|
|
|
|
byte m2 = byteString.m(1);
|
2021-12-02 18:53:44 +00:00
|
|
|
while (j4 < this.k) {
|
2021-11-02 06:38:17 +00:00
|
|
|
byte[] bArr = sVar.a;
|
2022-03-21 18:52:30 +00:00
|
|
|
i3 = (int) ((sVar.f3675b + j2) - j4);
|
2021-12-17 21:59:34 +00:00
|
|
|
int i5 = sVar.c;
|
2021-11-02 06:38:17 +00:00
|
|
|
while (i3 < i5) {
|
|
|
|
byte b2 = bArr[i3];
|
|
|
|
if (b2 == m || b2 == m2) {
|
2022-03-21 18:52:30 +00:00
|
|
|
i4 = sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
|
|
|
i3++;
|
|
|
|
}
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
j4 += sVar.c - sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
sVar = sVar.f;
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
j2 = j4;
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
return -1L;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
byte[] l = byteString.l();
|
2021-12-02 18:53:44 +00:00
|
|
|
while (j4 < this.k) {
|
2021-11-02 06:38:17 +00:00
|
|
|
byte[] bArr2 = sVar.a;
|
2022-03-21 18:52:30 +00:00
|
|
|
i3 = (int) ((sVar.f3675b + j2) - j4);
|
2021-12-17 21:59:34 +00:00
|
|
|
int i6 = sVar.c;
|
2021-11-02 06:38:17 +00:00
|
|
|
while (i3 < i6) {
|
|
|
|
byte b3 = bArr2[i3];
|
|
|
|
for (byte b4 : l) {
|
|
|
|
if (b3 == b4) {
|
2022-03-21 18:52:30 +00:00
|
|
|
i4 = sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
i3++;
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
j4 += sVar.c - sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
sVar = sVar.f;
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
j2 = j4;
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
return -1L;
|
|
|
|
return (i3 - i4) + j4;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
while (true) {
|
2022-03-21 18:52:30 +00:00
|
|
|
long j5 = (sVar.c - sVar.f3675b) + j3;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j5 > j2) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
sVar = sVar.f;
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
j3 = j5;
|
|
|
|
}
|
|
|
|
if (byteString.j() == 2) {
|
|
|
|
byte m3 = byteString.m(0);
|
|
|
|
byte m4 = byteString.m(1);
|
2021-12-02 18:53:44 +00:00
|
|
|
while (j3 < this.k) {
|
2021-11-02 06:38:17 +00:00
|
|
|
byte[] bArr3 = sVar.a;
|
2022-03-21 18:52:30 +00:00
|
|
|
i = (int) ((sVar.f3675b + j2) - j3);
|
2021-12-17 21:59:34 +00:00
|
|
|
int i7 = sVar.c;
|
2021-11-02 06:38:17 +00:00
|
|
|
while (i < i7) {
|
|
|
|
byte b5 = bArr3[i];
|
|
|
|
if (b5 == m3 || b5 == m4) {
|
2022-03-21 18:52:30 +00:00
|
|
|
i2 = sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
j3 += sVar.c - sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
sVar = sVar.f;
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
j2 = j3;
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
return -1L;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
byte[] l2 = byteString.l();
|
2021-12-02 18:53:44 +00:00
|
|
|
while (j3 < this.k) {
|
2021-11-02 06:38:17 +00:00
|
|
|
byte[] bArr4 = sVar.a;
|
2022-03-21 18:52:30 +00:00
|
|
|
i = (int) ((sVar.f3675b + j2) - j3);
|
2021-12-17 21:59:34 +00:00
|
|
|
int i8 = sVar.c;
|
2021-11-02 06:38:17 +00:00
|
|
|
while (i < i8) {
|
|
|
|
byte b6 = bArr4[i];
|
|
|
|
for (byte b7 : l2) {
|
|
|
|
if (b6 == b7) {
|
2022-03-21 18:52:30 +00:00
|
|
|
i2 = sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
i++;
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
j3 += sVar.c - sVar.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
sVar = sVar.f;
|
|
|
|
if (sVar == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
j2 = j3;
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
return -1L;
|
|
|
|
return (i - i2) + j3;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
throw new IllegalArgumentException(b.d.b.a.a.s("fromIndex < 0: ", j2).toString());
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.x
|
|
|
|
public y timeout() {
|
|
|
|
return y.a;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String toString() {
|
2021-12-02 18:53:44 +00:00
|
|
|
long j = this.k;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (j <= ((long) Integer.MAX_VALUE)) {
|
2021-11-05 06:48:17 +00:00
|
|
|
return J((int) j).toString();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
StringBuilder R = b.d.b.a.a.R("size > Int.MAX_VALUE: ");
|
|
|
|
R.append(this.k);
|
|
|
|
throw new IllegalStateException(R.toString().toString());
|
2021-11-05 06:48:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public final a u(a aVar) {
|
|
|
|
m.checkParameterIsNotNull(aVar, "unsafeCursor");
|
2021-12-02 18:53:44 +00:00
|
|
|
if (aVar.j == null) {
|
|
|
|
aVar.j = this;
|
|
|
|
aVar.k = true;
|
2021-11-05 06:48:17 +00:00
|
|
|
return aVar;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2021-11-05 06:48:17 +00:00
|
|
|
throw new IllegalStateException("already attached to a buffer".toString());
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
|
|
|
public InputStream u0() {
|
2022-03-07 09:34:54 +00:00
|
|
|
return new b();
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
2021-11-05 06:48:17 +00:00
|
|
|
public int v0(o oVar) {
|
2021-11-02 06:38:17 +00:00
|
|
|
m.checkParameterIsNotNull(oVar, "options");
|
|
|
|
int b2 = g0.z.a.b(this, oVar, false);
|
|
|
|
if (b2 == -1) {
|
|
|
|
return -1;
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
skip(oVar.l[b2].j());
|
2021-11-02 06:38:17 +00:00
|
|
|
return b2;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.g
|
2021-11-05 06:48:17 +00:00
|
|
|
public boolean w() {
|
2021-12-02 18:53:44 +00:00
|
|
|
return this.k == 0;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // java.nio.channels.WritableByteChannel
|
|
|
|
public int write(ByteBuffer byteBuffer) throws IOException {
|
|
|
|
m.checkParameterIsNotNull(byteBuffer, "source");
|
|
|
|
int remaining = byteBuffer.remaining();
|
|
|
|
int i = remaining;
|
|
|
|
while (i > 0) {
|
|
|
|
s N = N(1);
|
2021-12-17 21:59:34 +00:00
|
|
|
int min = Math.min(i, 8192 - N.c);
|
|
|
|
byteBuffer.get(N.a, N.c, min);
|
2021-11-02 06:38:17 +00:00
|
|
|
i -= min;
|
2021-12-17 21:59:34 +00:00
|
|
|
N.c += min;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
this.k += remaining;
|
2021-11-02 06:38:17 +00:00
|
|
|
return remaining;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // okio.BufferedSink
|
|
|
|
public /* bridge */ /* synthetic */ BufferedSink write(byte[] bArr) {
|
|
|
|
R(bArr);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // okio.BufferedSink
|
|
|
|
public /* bridge */ /* synthetic */ BufferedSink write(byte[] bArr, int i, int i2) {
|
|
|
|
S(bArr, i, i2);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // g0.v
|
|
|
|
public void write(e eVar, long j) {
|
|
|
|
s sVar;
|
2022-03-07 09:34:54 +00:00
|
|
|
int i;
|
2021-11-02 06:38:17 +00:00
|
|
|
s sVar2;
|
2022-03-07 09:34:54 +00:00
|
|
|
s sVar3;
|
2021-11-02 06:38:17 +00:00
|
|
|
m.checkParameterIsNotNull(eVar, "source");
|
|
|
|
if (eVar != this) {
|
2022-03-07 09:34:54 +00:00
|
|
|
f.B(eVar.k, 0L, j);
|
2021-11-02 06:38:17 +00:00
|
|
|
long j2 = j;
|
|
|
|
while (j2 > 0) {
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar4 = eVar.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar4 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
int i2 = sVar4.c;
|
|
|
|
if (eVar.j == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
if (j2 < i2 - sVar.f3675b) {
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar5 = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar5 != null) {
|
|
|
|
if (sVar5 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
sVar2 = sVar5.g;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
2022-03-07 09:34:54 +00:00
|
|
|
sVar2 = null;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
if (sVar2 != null && sVar2.e) {
|
2022-03-21 18:52:30 +00:00
|
|
|
if ((sVar2.c + j2) - (sVar2.d ? 0 : sVar2.f3675b) <= 8192) {
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar6 = eVar.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar6 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
sVar6.d(sVar2, (int) j2);
|
2021-12-02 18:53:44 +00:00
|
|
|
eVar.k -= j2;
|
|
|
|
this.k += j2;
|
2021-11-02 06:38:17 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar7 = eVar.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar7 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
int i3 = (int) j2;
|
|
|
|
Objects.requireNonNull(sVar7);
|
2022-03-21 18:52:30 +00:00
|
|
|
if (i3 > 0 && i3 <= sVar7.c - sVar7.f3675b) {
|
2021-11-02 06:38:17 +00:00
|
|
|
if (i3 >= 1024) {
|
2022-03-07 09:34:54 +00:00
|
|
|
sVar3 = sVar7.c();
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
2022-03-07 09:34:54 +00:00
|
|
|
sVar3 = t.b();
|
2021-11-02 06:38:17 +00:00
|
|
|
byte[] bArr = sVar7.a;
|
2022-03-07 09:34:54 +00:00
|
|
|
byte[] bArr2 = sVar3.a;
|
2022-03-21 18:52:30 +00:00
|
|
|
int i4 = sVar7.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
j.copyInto$default(bArr, bArr2, 0, i4, i4 + i3, 2, (Object) null);
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
sVar3.c = sVar3.f3675b + i3;
|
|
|
|
sVar7.f3675b += i3;
|
2021-11-02 06:38:17 +00:00
|
|
|
s sVar8 = sVar7.g;
|
|
|
|
if (sVar8 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
sVar8.b(sVar3);
|
|
|
|
eVar.j = sVar3;
|
2021-11-02 06:38:17 +00:00
|
|
|
} else {
|
|
|
|
throw new IllegalArgumentException("byteCount out of range".toString());
|
|
|
|
}
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
s sVar9 = eVar.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar9 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
long j3 = sVar9.c - sVar9.f3675b;
|
2021-12-02 18:53:44 +00:00
|
|
|
eVar.j = sVar9.a();
|
|
|
|
s sVar10 = this.j;
|
2021-11-02 06:38:17 +00:00
|
|
|
if (sVar10 == null) {
|
2021-12-02 18:53:44 +00:00
|
|
|
this.j = sVar9;
|
2021-11-02 06:38:17 +00:00
|
|
|
sVar9.g = sVar9;
|
|
|
|
sVar9.f = sVar9;
|
|
|
|
} else {
|
|
|
|
if (sVar10 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
s sVar11 = sVar10.g;
|
|
|
|
if (sVar11 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
sVar11.b(sVar9);
|
|
|
|
s sVar12 = sVar9.g;
|
|
|
|
if (sVar12 != sVar9) {
|
|
|
|
if (sVar12 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
if (sVar12.e) {
|
2022-03-21 18:52:30 +00:00
|
|
|
int i5 = sVar9.c - sVar9.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
s sVar13 = sVar9.g;
|
|
|
|
if (sVar13 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2021-12-17 21:59:34 +00:00
|
|
|
int i6 = 8192 - sVar13.c;
|
2021-11-02 06:38:17 +00:00
|
|
|
s sVar14 = sVar9.g;
|
|
|
|
if (sVar14 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
if (sVar14.d) {
|
|
|
|
i = 0;
|
|
|
|
} else {
|
|
|
|
s sVar15 = sVar9.g;
|
|
|
|
if (sVar15 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
2022-03-21 18:52:30 +00:00
|
|
|
i = sVar15.f3675b;
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
if (i5 <= i6 + i) {
|
|
|
|
s sVar16 = sVar9.g;
|
|
|
|
if (sVar16 == null) {
|
|
|
|
m.throwNpe();
|
|
|
|
}
|
|
|
|
sVar9.d(sVar16, i5);
|
|
|
|
sVar9.a();
|
|
|
|
t.a(sVar9);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
throw new IllegalStateException("cannot compact".toString());
|
|
|
|
}
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
eVar.k -= j3;
|
|
|
|
this.k += j3;
|
2021-11-02 06:38:17 +00:00
|
|
|
j2 -= j3;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
throw new IllegalArgumentException("source == this".toString());
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // okio.BufferedSink
|
|
|
|
public /* bridge */ /* synthetic */ BufferedSink writeByte(int i) {
|
|
|
|
T(i);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // okio.BufferedSink
|
|
|
|
public /* bridge */ /* synthetic */ BufferedSink writeInt(int i) {
|
|
|
|
W(i);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // okio.BufferedSink
|
|
|
|
public /* bridge */ /* synthetic */ BufferedSink writeShort(int i) {
|
2021-11-05 06:48:17 +00:00
|
|
|
X(i);
|
2021-11-02 06:38:17 +00:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public ByteString x() {
|
2021-12-02 18:53:44 +00:00
|
|
|
return o(this.k);
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
|
2021-11-05 06:48:17 +00:00
|
|
|
public short y() throws EOFException {
|
2021-11-02 06:38:17 +00:00
|
|
|
int readShort = readShort() & 65535;
|
|
|
|
return (short) (((readShort & 255) << 8) | ((65280 & readShort) >>> 8));
|
|
|
|
}
|
|
|
|
}
|