1112 lines
34 KiB
Java
1112 lines
34 KiB
Java
|
package com.google.protobuf;
|
||
|
|
||
|
import java.io.IOException;
|
||
|
import java.io.OutputStream;
|
||
|
import java.util.logging.Level;
|
||
|
import java.util.logging.Logger;
|
||
|
import o.AbstractC5573bvc;
|
||
|
import o.C16752qto;
|
||
|
import o.InterfaceC16095lEl;
|
||
|
import o.InterfaceC16581pUl;
|
||
|
import o.MTP;
|
||
|
import o.MZj;
|
||
|
import o.Nvr;
|
||
|
import o.QwV;
|
||
|
import o.Wnq;
|
||
|
import o.XYy;
|
||
|
import o.oQI;
|
||
|
import o.vqr;
|
||
|
import o.zRL;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public abstract class CodedOutputStream extends MZj {
|
||
|
private static final Logger a = Logger.getLogger(CodedOutputStream.class.getName());
|
||
|
private static final boolean b = vqr.b();
|
||
|
public oQI d;
|
||
|
public boolean e;
|
||
|
|
||
|
public static int b() {
|
||
|
return 4;
|
||
|
}
|
||
|
|
||
|
public static int c() {
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
public static int d() {
|
||
|
return 8;
|
||
|
}
|
||
|
|
||
|
public static int d(long j) {
|
||
|
int i;
|
||
|
if (((-128) & j) == 0) {
|
||
|
return 1;
|
||
|
}
|
||
|
if (j < 0) {
|
||
|
return 10;
|
||
|
}
|
||
|
if (((-34359738368L) & j) != 0) {
|
||
|
j >>>= 28;
|
||
|
i = 6;
|
||
|
} else {
|
||
|
i = 2;
|
||
|
}
|
||
|
if (((-2097152) & j) != 0) {
|
||
|
i += 2;
|
||
|
j >>>= 14;
|
||
|
}
|
||
|
return (j & (-16384)) != 0 ? i + 1 : i;
|
||
|
}
|
||
|
|
||
|
public static int e() {
|
||
|
return 8;
|
||
|
}
|
||
|
|
||
|
public static int f(int i) {
|
||
|
if (i > 4096) {
|
||
|
return 4096;
|
||
|
}
|
||
|
return i;
|
||
|
}
|
||
|
|
||
|
public static int g() {
|
||
|
return 8;
|
||
|
}
|
||
|
|
||
|
public static int h() {
|
||
|
return 4;
|
||
|
}
|
||
|
|
||
|
public static int j() {
|
||
|
return 4;
|
||
|
}
|
||
|
|
||
|
public static int k(int i) {
|
||
|
if ((i & (-128)) == 0) {
|
||
|
return 1;
|
||
|
}
|
||
|
if ((i & (-16384)) == 0) {
|
||
|
return 2;
|
||
|
}
|
||
|
if (((-2097152) & i) == 0) {
|
||
|
return 3;
|
||
|
}
|
||
|
return (i & (-268435456)) == 0 ? 4 : 5;
|
||
|
}
|
||
|
|
||
|
public abstract void a(byte b2) throws IOException;
|
||
|
|
||
|
public abstract void a(int i, String str) throws IOException;
|
||
|
|
||
|
public abstract void a(int i, InterfaceC16581pUl interfaceC16581pUl) throws IOException;
|
||
|
|
||
|
public abstract void a(long j) throws IOException;
|
||
|
|
||
|
public abstract void a(String str) throws IOException;
|
||
|
|
||
|
public abstract void b(int i, long j) throws IOException;
|
||
|
|
||
|
public abstract void b(int i, QwV qwV) throws IOException;
|
||
|
|
||
|
public abstract void b(InterfaceC16581pUl interfaceC16581pUl) throws IOException;
|
||
|
|
||
|
public abstract void c(int i, int i2) throws IOException;
|
||
|
|
||
|
public abstract void c(int i, boolean z) throws IOException;
|
||
|
|
||
|
public abstract void c(QwV qwV) throws IOException;
|
||
|
|
||
|
public abstract void d(int i, QwV qwV) throws IOException;
|
||
|
|
||
|
public abstract void d(byte[] bArr, int i) throws IOException;
|
||
|
|
||
|
public abstract void e(int i, long j) throws IOException;
|
||
|
|
||
|
public abstract void e(int i, InterfaceC16581pUl interfaceC16581pUl, Wnq wnq) throws IOException;
|
||
|
|
||
|
public abstract void e(long j) throws IOException;
|
||
|
|
||
|
public abstract void f() throws IOException;
|
||
|
|
||
|
public abstract void f(int i, int i2) throws IOException;
|
||
|
|
||
|
public abstract void g(int i, int i2) throws IOException;
|
||
|
|
||
|
public abstract void h(int i, int i2) throws IOException;
|
||
|
|
||
|
public abstract int i();
|
||
|
|
||
|
public abstract void p(int i) throws IOException;
|
||
|
|
||
|
public abstract void r(int i) throws IOException;
|
||
|
|
||
|
public abstract void t(int i) throws IOException;
|
||
|
|
||
|
/* synthetic */ CodedOutputStream(byte b2) {
|
||
|
this();
|
||
|
}
|
||
|
|
||
|
public static CodedOutputStream c(OutputStream outputStream, int i) {
|
||
|
return new HBt(outputStream, i);
|
||
|
}
|
||
|
|
||
|
public static CodedOutputStream a(byte[] bArr) {
|
||
|
return new RVV(bArr, 0, bArr.length);
|
||
|
}
|
||
|
|
||
|
public static CodedOutputStream c(byte[] bArr, int i, int i2) {
|
||
|
return new RVV(bArr, i, i2);
|
||
|
}
|
||
|
|
||
|
private CodedOutputStream() {
|
||
|
}
|
||
|
|
||
|
public static int o(int i) {
|
||
|
return k(Nvr.c(i, 0));
|
||
|
}
|
||
|
|
||
|
public static int g(int i) {
|
||
|
if (i >= 0) {
|
||
|
return k(i);
|
||
|
}
|
||
|
return 10;
|
||
|
}
|
||
|
|
||
|
public static int m(int i) {
|
||
|
return k((i << 1) ^ (i >> 31));
|
||
|
}
|
||
|
|
||
|
public static int b(long j) {
|
||
|
return d(j);
|
||
|
}
|
||
|
|
||
|
public static int c(long j) {
|
||
|
return d((j << 1) ^ (j >> 63));
|
||
|
}
|
||
|
|
||
|
public static int d(String str) {
|
||
|
int length;
|
||
|
try {
|
||
|
length = C16752qto.b(str);
|
||
|
} catch (C16752qto.HBt unused) {
|
||
|
length = str.getBytes(MTP.b).length;
|
||
|
}
|
||
|
return k(length) + length;
|
||
|
}
|
||
|
|
||
|
public static int d(XYy xYy) {
|
||
|
int c = xYy.c();
|
||
|
return k(c) + c;
|
||
|
}
|
||
|
|
||
|
public static int b(QwV qwV) {
|
||
|
int g = qwV.g();
|
||
|
return k(g) + g;
|
||
|
}
|
||
|
|
||
|
public static int b(byte[] bArr) {
|
||
|
int length = bArr.length;
|
||
|
return k(length) + length;
|
||
|
}
|
||
|
|
||
|
public static int d(InterfaceC16581pUl interfaceC16581pUl) {
|
||
|
int serializedSize = interfaceC16581pUl.getSerializedSize();
|
||
|
return k(serializedSize) + serializedSize;
|
||
|
}
|
||
|
|
||
|
public static int a(InterfaceC16581pUl interfaceC16581pUl, Wnq wnq) {
|
||
|
int serializedSize = ((AbstractC5573bvc) interfaceC16581pUl).getSerializedSize(wnq);
|
||
|
return k(serializedSize) + serializedSize;
|
||
|
}
|
||
|
|
||
|
public static int h(int i) {
|
||
|
return k(i) + i;
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class OutOfSpaceException extends IOException {
|
||
|
OutOfSpaceException() {
|
||
|
super("CodedOutputStream was writing to a flat byte array and ran out of space.");
|
||
|
}
|
||
|
|
||
|
OutOfSpaceException(Throwable th) {
|
||
|
super("CodedOutputStream was writing to a flat byte array and ran out of space.", th);
|
||
|
}
|
||
|
|
||
|
public OutOfSpaceException(String str, Throwable th) {
|
||
|
super("CodedOutputStream was writing to a flat byte array and ran out of space.: ".concat(String.valueOf(str)), th);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
final void e(String str, C16752qto.HBt hBt) throws IOException {
|
||
|
a.log(Level.WARNING, "Converting ill-formed UTF-16. Your Protocol Buffer will not round trip correctly!", (Throwable) hBt);
|
||
|
byte[] bytes = str.getBytes(MTP.b);
|
||
|
try {
|
||
|
r(bytes.length);
|
||
|
b(bytes, 0, bytes.length);
|
||
|
} catch (OutOfSpaceException e) {
|
||
|
throw e;
|
||
|
} catch (IndexOutOfBoundsException e2) {
|
||
|
throw new OutOfSpaceException(e2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Deprecated
|
||
|
public static int a(InterfaceC16581pUl interfaceC16581pUl) {
|
||
|
return interfaceC16581pUl.getSerializedSize();
|
||
|
}
|
||
|
|
||
|
@Deprecated
|
||
|
public static int j(int i) {
|
||
|
return k(i);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class RVV extends CodedOutputStream {
|
||
|
private final byte[] a;
|
||
|
private final int b;
|
||
|
private final int c;
|
||
|
private int i;
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void f() {
|
||
|
}
|
||
|
|
||
|
RVV(byte[] bArr, int i, int i2) {
|
||
|
super((byte) 0);
|
||
|
if (bArr == null) {
|
||
|
throw new NullPointerException("buffer");
|
||
|
}
|
||
|
int i3 = i + i2;
|
||
|
if (((bArr.length - i3) | i | i2) < 0) {
|
||
|
throw new IllegalArgumentException(String.format("Array range is invalid. Buffer.length=%d, offset=%d, length=%d", Integer.valueOf(bArr.length), Integer.valueOf(i), Integer.valueOf(i2)));
|
||
|
}
|
||
|
this.a = bArr;
|
||
|
this.c = i;
|
||
|
this.i = i;
|
||
|
this.b = i3;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void g(int i, int i2) throws IOException {
|
||
|
r(Nvr.c(i, i2));
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void c(QwV qwV) throws IOException {
|
||
|
r(qwV.g());
|
||
|
qwV.b(this);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void d(byte[] bArr, int i) throws IOException {
|
||
|
r(i);
|
||
|
e(bArr, 0, i);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void b(InterfaceC16581pUl interfaceC16581pUl) throws IOException {
|
||
|
r(interfaceC16581pUl.getSerializedSize());
|
||
|
interfaceC16581pUl.writeTo(this);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void a(byte b) throws IOException {
|
||
|
try {
|
||
|
byte[] bArr = this.a;
|
||
|
int i = this.i;
|
||
|
this.i = i + 1;
|
||
|
bArr[i] = b;
|
||
|
} catch (IndexOutOfBoundsException e) {
|
||
|
throw new OutOfSpaceException(String.format("Pos: %d, limit: %d, len: %d", Integer.valueOf(this.i), Integer.valueOf(this.b), 1), e);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void t(int i) throws IOException {
|
||
|
if (i >= 0) {
|
||
|
r(i);
|
||
|
} else {
|
||
|
a(i);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void r(int i) throws IOException {
|
||
|
if (CodedOutputStream.b && !zRL.d()) {
|
||
|
int i2 = this.b;
|
||
|
int i3 = this.i;
|
||
|
if (i2 - i3 >= 5) {
|
||
|
if ((i & (-128)) == 0) {
|
||
|
byte[] bArr = this.a;
|
||
|
this.i = i3 + 1;
|
||
|
vqr.b(bArr, i3, (byte) i);
|
||
|
return;
|
||
|
}
|
||
|
byte[] bArr2 = this.a;
|
||
|
this.i = i3 + 1;
|
||
|
vqr.b(bArr2, i3, (byte) (i | 128));
|
||
|
int i4 = i >>> 7;
|
||
|
if ((i4 & (-128)) == 0) {
|
||
|
byte[] bArr3 = this.a;
|
||
|
int i5 = this.i;
|
||
|
this.i = i5 + 1;
|
||
|
vqr.b(bArr3, i5, (byte) i4);
|
||
|
return;
|
||
|
}
|
||
|
byte[] bArr4 = this.a;
|
||
|
int i6 = this.i;
|
||
|
this.i = i6 + 1;
|
||
|
vqr.b(bArr4, i6, (byte) (i4 | 128));
|
||
|
int i7 = i >>> 14;
|
||
|
if ((i7 & (-128)) == 0) {
|
||
|
byte[] bArr5 = this.a;
|
||
|
int i8 = this.i;
|
||
|
this.i = i8 + 1;
|
||
|
vqr.b(bArr5, i8, (byte) i7);
|
||
|
return;
|
||
|
}
|
||
|
byte[] bArr6 = this.a;
|
||
|
int i9 = this.i;
|
||
|
this.i = i9 + 1;
|
||
|
vqr.b(bArr6, i9, (byte) (i7 | 128));
|
||
|
int i10 = i >>> 21;
|
||
|
if ((i10 & (-128)) == 0) {
|
||
|
byte[] bArr7 = this.a;
|
||
|
int i11 = this.i;
|
||
|
this.i = i11 + 1;
|
||
|
vqr.b(bArr7, i11, (byte) i10);
|
||
|
return;
|
||
|
}
|
||
|
byte[] bArr8 = this.a;
|
||
|
int i12 = this.i;
|
||
|
this.i = i12 + 1;
|
||
|
vqr.b(bArr8, i12, (byte) (i10 | 128));
|
||
|
byte[] bArr9 = this.a;
|
||
|
int i13 = this.i;
|
||
|
this.i = i13 + 1;
|
||
|
vqr.b(bArr9, i13, (byte) (i >>> 28));
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
while ((i & (-128)) != 0) {
|
||
|
try {
|
||
|
byte[] bArr10 = this.a;
|
||
|
int i14 = this.i;
|
||
|
this.i = i14 + 1;
|
||
|
bArr10[i14] = (byte) ((i & 127) | 128);
|
||
|
i >>>= 7;
|
||
|
} catch (IndexOutOfBoundsException e) {
|
||
|
throw new OutOfSpaceException(String.format("Pos: %d, limit: %d, len: %d", Integer.valueOf(this.i), Integer.valueOf(this.b), 1), e);
|
||
|
}
|
||
|
}
|
||
|
byte[] bArr11 = this.a;
|
||
|
int i15 = this.i;
|
||
|
this.i = i15 + 1;
|
||
|
bArr11[i15] = (byte) i;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void p(int i) throws IOException {
|
||
|
try {
|
||
|
byte[] bArr = this.a;
|
||
|
int i2 = this.i;
|
||
|
bArr[i2] = (byte) i;
|
||
|
bArr[i2 + 1] = (byte) (i >> 8);
|
||
|
bArr[i2 + 2] = (byte) (i >> 16);
|
||
|
this.i = i2 + 4;
|
||
|
bArr[i2 + 3] = (byte) (i >>> 24);
|
||
|
} catch (IndexOutOfBoundsException e) {
|
||
|
throw new OutOfSpaceException(String.format("Pos: %d, limit: %d, len: %d", Integer.valueOf(this.i), Integer.valueOf(this.b), 1), e);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void a(long j) throws IOException {
|
||
|
if (CodedOutputStream.b && this.b - this.i >= 10) {
|
||
|
while ((j & (-128)) != 0) {
|
||
|
byte[] bArr = this.a;
|
||
|
int i = this.i;
|
||
|
this.i = i + 1;
|
||
|
vqr.b(bArr, i, (byte) ((((int) j) & 127) | 128));
|
||
|
j >>>= 7;
|
||
|
}
|
||
|
byte[] bArr2 = this.a;
|
||
|
int i2 = this.i;
|
||
|
this.i = i2 + 1;
|
||
|
vqr.b(bArr2, i2, (byte) j);
|
||
|
return;
|
||
|
}
|
||
|
while ((j & (-128)) != 0) {
|
||
|
try {
|
||
|
byte[] bArr3 = this.a;
|
||
|
int i3 = this.i;
|
||
|
this.i = i3 + 1;
|
||
|
bArr3[i3] = (byte) ((((int) j) & 127) | 128);
|
||
|
j >>>= 7;
|
||
|
} catch (IndexOutOfBoundsException e) {
|
||
|
throw new OutOfSpaceException(String.format("Pos: %d, limit: %d, len: %d", Integer.valueOf(this.i), Integer.valueOf(this.b), 1), e);
|
||
|
}
|
||
|
}
|
||
|
byte[] bArr4 = this.a;
|
||
|
int i4 = this.i;
|
||
|
this.i = i4 + 1;
|
||
|
bArr4[i4] = (byte) j;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void e(long j) throws IOException {
|
||
|
try {
|
||
|
byte[] bArr = this.a;
|
||
|
int i = this.i;
|
||
|
bArr[i] = (byte) j;
|
||
|
bArr[i + 1] = (byte) (j >> 8);
|
||
|
bArr[i + 2] = (byte) (j >> 16);
|
||
|
bArr[i + 3] = (byte) (j >> 24);
|
||
|
bArr[i + 4] = (byte) (j >> 32);
|
||
|
bArr[i + 5] = (byte) (j >> 40);
|
||
|
bArr[i + 6] = (byte) (j >> 48);
|
||
|
this.i = i + 8;
|
||
|
bArr[i + 7] = (byte) (j >> 56);
|
||
|
} catch (IndexOutOfBoundsException e) {
|
||
|
throw new OutOfSpaceException(String.format("Pos: %d, limit: %d, len: %d", Integer.valueOf(this.i), Integer.valueOf(this.b), 1), e);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void e(byte[] bArr, int i, int i2) throws IOException {
|
||
|
try {
|
||
|
System.arraycopy(bArr, i, this.a, this.i, i2);
|
||
|
this.i += i2;
|
||
|
} catch (IndexOutOfBoundsException e) {
|
||
|
throw new OutOfSpaceException(String.format("Pos: %d, limit: %d, len: %d", Integer.valueOf(this.i), Integer.valueOf(this.b), Integer.valueOf(i2)), e);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.MZj
|
||
|
public final void b(byte[] bArr, int i, int i2) throws IOException {
|
||
|
e(bArr, i, i2);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void a(String str) throws IOException {
|
||
|
int i = this.i;
|
||
|
try {
|
||
|
int k = k(str.length() * 3);
|
||
|
int k2 = k(str.length());
|
||
|
if (k2 == k) {
|
||
|
int i2 = i + k2;
|
||
|
this.i = i2;
|
||
|
int b = C16752qto.b(str, this.a, i2, this.b - i2);
|
||
|
this.i = i;
|
||
|
r((b - i) - k2);
|
||
|
this.i = b;
|
||
|
return;
|
||
|
}
|
||
|
r(C16752qto.b(str));
|
||
|
byte[] bArr = this.a;
|
||
|
int i3 = this.i;
|
||
|
this.i = C16752qto.b(str, bArr, i3, this.b - i3);
|
||
|
} catch (IndexOutOfBoundsException e) {
|
||
|
throw new OutOfSpaceException(e);
|
||
|
} catch (C16752qto.HBt e2) {
|
||
|
this.i = i;
|
||
|
e(str, e2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void c(int i, boolean z) throws IOException {
|
||
|
r(Nvr.c(i, 0));
|
||
|
a(z ? (byte) 1 : (byte) 0);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void d(int i, QwV qwV) throws IOException {
|
||
|
r(Nvr.c(i, 2));
|
||
|
r(qwV.g());
|
||
|
qwV.b(this);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void c(int i, int i2) throws IOException {
|
||
|
r(Nvr.c(i, 5));
|
||
|
p(i2);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void b(int i, long j) throws IOException {
|
||
|
r(Nvr.c(i, 1));
|
||
|
e(j);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void h(int i, int i2) throws IOException {
|
||
|
r(Nvr.c(i, 0));
|
||
|
if (i2 >= 0) {
|
||
|
r(i2);
|
||
|
} else {
|
||
|
a(i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void e(int i, InterfaceC16581pUl interfaceC16581pUl, Wnq wnq) throws IOException {
|
||
|
r(Nvr.c(i, 2));
|
||
|
r(((AbstractC5573bvc) interfaceC16581pUl).getSerializedSize(wnq));
|
||
|
wnq.a((Wnq) interfaceC16581pUl, (InterfaceC16095lEl) this.d);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void a(int i, InterfaceC16581pUl interfaceC16581pUl) throws IOException {
|
||
|
r(Nvr.c(1, 3));
|
||
|
g(2, 0);
|
||
|
r(i);
|
||
|
r(Nvr.c(3, 2));
|
||
|
r(interfaceC16581pUl.getSerializedSize());
|
||
|
interfaceC16581pUl.writeTo(this);
|
||
|
r(Nvr.c(1, 4));
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void b(int i, QwV qwV) throws IOException {
|
||
|
r(Nvr.c(1, 3));
|
||
|
g(2, 0);
|
||
|
r(i);
|
||
|
d(3, qwV);
|
||
|
r(Nvr.c(1, 4));
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void a(int i, String str) throws IOException {
|
||
|
r(Nvr.c(i, 2));
|
||
|
a(str);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void f(int i, int i2) throws IOException {
|
||
|
r(Nvr.c(i, 0));
|
||
|
r(i2);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void e(int i, long j) throws IOException {
|
||
|
r(Nvr.c(i, 0));
|
||
|
a(j);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final int i() {
|
||
|
return this.b - this.i;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static abstract class IeS extends CodedOutputStream {
|
||
|
int a;
|
||
|
final int b;
|
||
|
final byte[] c;
|
||
|
int f;
|
||
|
|
||
|
IeS(int i) {
|
||
|
super((byte) 0);
|
||
|
if (i < 0) {
|
||
|
throw new IllegalArgumentException("bufferSize must be >= 0");
|
||
|
}
|
||
|
int max = Math.max(i, 20);
|
||
|
this.c = new byte[max];
|
||
|
this.b = max;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final int i() {
|
||
|
throw new UnsupportedOperationException("spaceLeft() can only be called on CodedOutputStreams that are writing to a flat array or ByteBuffer.");
|
||
|
}
|
||
|
|
||
|
final void q(int i) {
|
||
|
if (CodedOutputStream.b) {
|
||
|
long j = this.a;
|
||
|
while ((i & (-128)) != 0) {
|
||
|
byte[] bArr = this.c;
|
||
|
int i2 = this.a;
|
||
|
this.a = i2 + 1;
|
||
|
vqr.b(bArr, i2, (byte) ((i & 127) | 128));
|
||
|
i >>>= 7;
|
||
|
}
|
||
|
byte[] bArr2 = this.c;
|
||
|
int i3 = this.a;
|
||
|
this.a = i3 + 1;
|
||
|
vqr.b(bArr2, i3, (byte) i);
|
||
|
this.f += (int) (this.a - j);
|
||
|
return;
|
||
|
}
|
||
|
while ((i & (-128)) != 0) {
|
||
|
byte[] bArr3 = this.c;
|
||
|
int i4 = this.a;
|
||
|
this.a = i4 + 1;
|
||
|
bArr3[i4] = (byte) ((i & 127) | 128);
|
||
|
this.f++;
|
||
|
i >>>= 7;
|
||
|
}
|
||
|
byte[] bArr4 = this.c;
|
||
|
int i5 = this.a;
|
||
|
this.a = i5 + 1;
|
||
|
bArr4[i5] = (byte) i;
|
||
|
this.f++;
|
||
|
}
|
||
|
|
||
|
final void j(long j) {
|
||
|
if (CodedOutputStream.b) {
|
||
|
long j2 = this.a;
|
||
|
while ((j & (-128)) != 0) {
|
||
|
byte[] bArr = this.c;
|
||
|
int i = this.a;
|
||
|
this.a = i + 1;
|
||
|
vqr.b(bArr, i, (byte) ((((int) j) & 127) | 128));
|
||
|
j >>>= 7;
|
||
|
}
|
||
|
byte[] bArr2 = this.c;
|
||
|
int i2 = this.a;
|
||
|
this.a = i2 + 1;
|
||
|
vqr.b(bArr2, i2, (byte) j);
|
||
|
this.f += (int) (this.a - j2);
|
||
|
return;
|
||
|
}
|
||
|
while ((j & (-128)) != 0) {
|
||
|
byte[] bArr3 = this.c;
|
||
|
int i3 = this.a;
|
||
|
this.a = i3 + 1;
|
||
|
bArr3[i3] = (byte) ((((int) j) & 127) | 128);
|
||
|
this.f++;
|
||
|
j >>>= 7;
|
||
|
}
|
||
|
byte[] bArr4 = this.c;
|
||
|
int i4 = this.a;
|
||
|
this.a = i4 + 1;
|
||
|
bArr4[i4] = (byte) j;
|
||
|
this.f++;
|
||
|
}
|
||
|
|
||
|
final void s(int i) {
|
||
|
byte[] bArr = this.c;
|
||
|
int i2 = this.a;
|
||
|
bArr[i2] = (byte) i;
|
||
|
bArr[i2 + 1] = (byte) (i >> 8);
|
||
|
bArr[i2 + 2] = (byte) (i >> 16);
|
||
|
this.a = i2 + 4;
|
||
|
bArr[i2 + 3] = (byte) (i >>> 24);
|
||
|
this.f += 4;
|
||
|
}
|
||
|
|
||
|
final void h(long j) {
|
||
|
byte[] bArr = this.c;
|
||
|
int i = this.a;
|
||
|
bArr[i] = (byte) (j & 255);
|
||
|
bArr[i + 1] = (byte) ((j >> 8) & 255);
|
||
|
bArr[i + 2] = (byte) ((j >> 16) & 255);
|
||
|
bArr[i + 3] = (byte) (255 & (j >> 24));
|
||
|
bArr[i + 4] = (byte) (j >> 32);
|
||
|
bArr[i + 5] = (byte) (j >> 40);
|
||
|
bArr[i + 6] = (byte) (j >> 48);
|
||
|
this.a = i + 8;
|
||
|
bArr[i + 7] = (byte) (j >> 56);
|
||
|
this.f += 8;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static int a(int i) {
|
||
|
return k(Nvr.c(i, 0)) + 1;
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
static final class HBt extends IeS {
|
||
|
private final OutputStream h;
|
||
|
|
||
|
HBt(OutputStream outputStream, int i) {
|
||
|
super(i);
|
||
|
if (outputStream == null) {
|
||
|
throw new NullPointerException("out");
|
||
|
}
|
||
|
this.h = outputStream;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void g(int i, int i2) throws IOException {
|
||
|
int c = Nvr.c(i, i2);
|
||
|
w(5);
|
||
|
q(c);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void h(int i, int i2) throws IOException {
|
||
|
w(20);
|
||
|
q(Nvr.c(i, 0));
|
||
|
if (i2 >= 0) {
|
||
|
q(i2);
|
||
|
} else {
|
||
|
j(i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void f(int i, int i2) throws IOException {
|
||
|
w(20);
|
||
|
q(Nvr.c(i, 0));
|
||
|
q(i2);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void c(int i, int i2) throws IOException {
|
||
|
w(14);
|
||
|
q(Nvr.c(i, 5));
|
||
|
s(i2);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void e(int i, long j) throws IOException {
|
||
|
w(20);
|
||
|
q(Nvr.c(i, 0));
|
||
|
j(j);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void b(int i, long j) throws IOException {
|
||
|
w(18);
|
||
|
q(Nvr.c(i, 1));
|
||
|
h(j);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void c(int i, boolean z) throws IOException {
|
||
|
w(11);
|
||
|
q(Nvr.c(i, 0));
|
||
|
byte b = z ? (byte) 1 : (byte) 0;
|
||
|
byte[] bArr = this.c;
|
||
|
int i2 = this.a;
|
||
|
this.a = i2 + 1;
|
||
|
bArr[i2] = b;
|
||
|
this.f++;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void c(QwV qwV) throws IOException {
|
||
|
int g = qwV.g();
|
||
|
w(5);
|
||
|
q(g);
|
||
|
qwV.b(this);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void b(InterfaceC16581pUl interfaceC16581pUl) throws IOException {
|
||
|
int serializedSize = interfaceC16581pUl.getSerializedSize();
|
||
|
w(5);
|
||
|
q(serializedSize);
|
||
|
interfaceC16581pUl.writeTo(this);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void a(byte b) throws IOException {
|
||
|
if (this.a == this.b) {
|
||
|
this.h.write(this.c, 0, this.a);
|
||
|
this.a = 0;
|
||
|
}
|
||
|
byte[] bArr = this.c;
|
||
|
int i = this.a;
|
||
|
this.a = i + 1;
|
||
|
bArr[i] = b;
|
||
|
this.f++;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void r(int i) throws IOException {
|
||
|
w(5);
|
||
|
q(i);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void p(int i) throws IOException {
|
||
|
w(4);
|
||
|
s(i);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void a(long j) throws IOException {
|
||
|
w(10);
|
||
|
j(j);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void e(long j) throws IOException {
|
||
|
w(8);
|
||
|
h(j);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void a(String str) throws IOException {
|
||
|
int b;
|
||
|
try {
|
||
|
int length = str.length() * 3;
|
||
|
int k = k(length);
|
||
|
int i = k + length;
|
||
|
if (i > this.b) {
|
||
|
byte[] bArr = new byte[length];
|
||
|
int b2 = C16752qto.b(str, bArr, 0, length);
|
||
|
w(5);
|
||
|
q(b2);
|
||
|
e(bArr, 0, b2);
|
||
|
return;
|
||
|
}
|
||
|
if (i > this.b - this.a) {
|
||
|
this.h.write(this.c, 0, this.a);
|
||
|
this.a = 0;
|
||
|
}
|
||
|
int k2 = k(str.length());
|
||
|
int i2 = this.a;
|
||
|
try {
|
||
|
if (k2 == k) {
|
||
|
this.a = i2 + k2;
|
||
|
int b3 = C16752qto.b(str, this.c, this.a, this.b - this.a);
|
||
|
this.a = i2;
|
||
|
b = (b3 - i2) - k2;
|
||
|
q(b);
|
||
|
this.a = b3;
|
||
|
} else {
|
||
|
b = C16752qto.b(str);
|
||
|
q(b);
|
||
|
this.a = C16752qto.b(str, this.c, this.a, b);
|
||
|
}
|
||
|
this.f += b;
|
||
|
} catch (ArrayIndexOutOfBoundsException e) {
|
||
|
throw new OutOfSpaceException(e);
|
||
|
} catch (C16752qto.HBt e2) {
|
||
|
this.f -= this.a - i2;
|
||
|
this.a = i2;
|
||
|
throw e2;
|
||
|
}
|
||
|
} catch (C16752qto.HBt e3) {
|
||
|
e(str, e3);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void f() throws IOException {
|
||
|
if (this.a > 0) {
|
||
|
this.h.write(this.c, 0, this.a);
|
||
|
this.a = 0;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void e(byte[] bArr, int i, int i2) throws IOException {
|
||
|
if (this.b - this.a >= i2) {
|
||
|
System.arraycopy(bArr, i, this.c, this.a, i2);
|
||
|
this.a += i2;
|
||
|
} else {
|
||
|
int i3 = this.b - this.a;
|
||
|
System.arraycopy(bArr, i, this.c, this.a, i3);
|
||
|
int i4 = i + i3;
|
||
|
i2 -= i3;
|
||
|
this.a = this.b;
|
||
|
this.f += i3;
|
||
|
this.h.write(this.c, 0, this.a);
|
||
|
this.a = 0;
|
||
|
if (i2 <= this.b) {
|
||
|
System.arraycopy(bArr, i4, this.c, 0, i2);
|
||
|
this.a = i2;
|
||
|
} else {
|
||
|
this.h.write(bArr, i4, i2);
|
||
|
}
|
||
|
}
|
||
|
this.f += i2;
|
||
|
}
|
||
|
|
||
|
@Override // o.MZj
|
||
|
public final void b(byte[] bArr, int i, int i2) throws IOException {
|
||
|
e(bArr, i, i2);
|
||
|
}
|
||
|
|
||
|
private void w(int i) throws IOException {
|
||
|
if (this.b - this.a < i) {
|
||
|
this.h.write(this.c, 0, this.a);
|
||
|
this.a = 0;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void d(byte[] bArr, int i) throws IOException {
|
||
|
w(5);
|
||
|
q(i);
|
||
|
e(bArr, 0, i);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void d(int i, QwV qwV) throws IOException {
|
||
|
r(Nvr.c(i, 2));
|
||
|
r(qwV.g());
|
||
|
qwV.b(this);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void t(int i) throws IOException {
|
||
|
if (i >= 0) {
|
||
|
w(5);
|
||
|
q(i);
|
||
|
} else {
|
||
|
w(10);
|
||
|
j(i);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void e(int i, InterfaceC16581pUl interfaceC16581pUl, Wnq wnq) throws IOException {
|
||
|
r(Nvr.c(i, 2));
|
||
|
int serializedSize = ((AbstractC5573bvc) interfaceC16581pUl).getSerializedSize(wnq);
|
||
|
w(5);
|
||
|
q(serializedSize);
|
||
|
wnq.a((Wnq) interfaceC16581pUl, (InterfaceC16095lEl) this.d);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void a(int i, InterfaceC16581pUl interfaceC16581pUl) throws IOException {
|
||
|
r(Nvr.c(1, 3));
|
||
|
w(20);
|
||
|
q(Nvr.c(2, 0));
|
||
|
q(i);
|
||
|
r(Nvr.c(3, 2));
|
||
|
int serializedSize = interfaceC16581pUl.getSerializedSize();
|
||
|
w(5);
|
||
|
q(serializedSize);
|
||
|
interfaceC16581pUl.writeTo(this);
|
||
|
r(Nvr.c(1, 4));
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void b(int i, QwV qwV) throws IOException {
|
||
|
r(Nvr.c(1, 3));
|
||
|
w(20);
|
||
|
q(Nvr.c(2, 0));
|
||
|
q(i);
|
||
|
d(3, qwV);
|
||
|
r(Nvr.c(1, 4));
|
||
|
}
|
||
|
|
||
|
@Override // com.google.protobuf.CodedOutputStream
|
||
|
public final void a(int i, String str) throws IOException {
|
||
|
r(Nvr.c(i, 2));
|
||
|
a(str);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static int e(int i, QwV qwV) {
|
||
|
int k = k(Nvr.c(i, 0));
|
||
|
int g = qwV.g();
|
||
|
return k + k(g) + g;
|
||
|
}
|
||
|
|
||
|
public static int b(int i) {
|
||
|
return k(Nvr.c(i, 0)) + 8;
|
||
|
}
|
||
|
|
||
|
public static int a(int i, int i2) {
|
||
|
return k(Nvr.c(i, 0)) + (i2 >= 0 ? k(i2) : 10);
|
||
|
}
|
||
|
|
||
|
public static int c(int i) {
|
||
|
if (i >= 0) {
|
||
|
return k(i);
|
||
|
}
|
||
|
return 10;
|
||
|
}
|
||
|
|
||
|
public static int e(int i) {
|
||
|
return k(Nvr.c(i, 0)) + 4;
|
||
|
}
|
||
|
|
||
|
public static int d(int i) {
|
||
|
return k(Nvr.c(i, 0)) + 8;
|
||
|
}
|
||
|
|
||
|
public static int i(int i) {
|
||
|
return k(Nvr.c(i, 0)) + 4;
|
||
|
}
|
||
|
|
||
|
@Deprecated
|
||
|
public static int d(int i, InterfaceC16581pUl interfaceC16581pUl, Wnq wnq) {
|
||
|
return (k(Nvr.c(i, 0)) << 1) + ((AbstractC5573bvc) interfaceC16581pUl).getSerializedSize(wnq);
|
||
|
}
|
||
|
|
||
|
public static int e(int i, int i2) {
|
||
|
return k(Nvr.c(i, 0)) + (i2 >= 0 ? k(i2) : 10);
|
||
|
}
|
||
|
|
||
|
public static int a(int i, long j) {
|
||
|
return k(Nvr.c(i, 0)) + d(j);
|
||
|
}
|
||
|
|
||
|
public static int b(int i, XYy xYy) {
|
||
|
int k = k(Nvr.c(1, 0));
|
||
|
int k2 = k(Nvr.c(2, 0)) + k(i);
|
||
|
int k3 = k(Nvr.c(3, 0));
|
||
|
int c = xYy.c();
|
||
|
return (k << 1) + k2 + k3 + k(c) + c;
|
||
|
}
|
||
|
|
||
|
public static int c(int i, XYy xYy) {
|
||
|
int k = k(Nvr.c(i, 0));
|
||
|
int c = xYy.c();
|
||
|
return k + k(c) + c;
|
||
|
}
|
||
|
|
||
|
public static int b(int i, InterfaceC16581pUl interfaceC16581pUl) {
|
||
|
int k = k(Nvr.c(1, 0));
|
||
|
int k2 = k(Nvr.c(2, 0)) + k(i);
|
||
|
int k3 = k(Nvr.c(3, 0));
|
||
|
int serializedSize = interfaceC16581pUl.getSerializedSize();
|
||
|
return (k << 1) + k2 + k3 + k(serializedSize) + serializedSize;
|
||
|
}
|
||
|
|
||
|
public static int b(int i, InterfaceC16581pUl interfaceC16581pUl, Wnq wnq) {
|
||
|
int k = k(Nvr.c(i, 0));
|
||
|
int serializedSize = ((AbstractC5573bvc) interfaceC16581pUl).getSerializedSize(wnq);
|
||
|
return k + k(serializedSize) + serializedSize;
|
||
|
}
|
||
|
|
||
|
public static int a(int i, QwV qwV) {
|
||
|
int k = k(Nvr.c(1, 0));
|
||
|
int k2 = k(Nvr.c(2, 0)) + k(i);
|
||
|
int k3 = k(Nvr.c(3, 0));
|
||
|
int g = qwV.g();
|
||
|
return (k << 1) + k2 + k3 + k(g) + g;
|
||
|
}
|
||
|
|
||
|
public static int n(int i) {
|
||
|
return k(Nvr.c(i, 0)) + 4;
|
||
|
}
|
||
|
|
||
|
public static int l(int i) {
|
||
|
return k(Nvr.c(i, 0)) + 8;
|
||
|
}
|
||
|
|
||
|
public static int d(int i, int i2) {
|
||
|
return k(Nvr.c(i, 0)) + k((i2 << 1) ^ (i2 >> 31));
|
||
|
}
|
||
|
|
||
|
public static int d(int i, long j) {
|
||
|
return k(Nvr.c(i, 0)) + d((j << 1) ^ (j >> 63));
|
||
|
}
|
||
|
|
||
|
public static int b(int i, String str) {
|
||
|
return k(Nvr.c(i, 0)) + d(str);
|
||
|
}
|
||
|
|
||
|
public static int b(int i, int i2) {
|
||
|
return k(Nvr.c(i, 0)) + k(i2);
|
||
|
}
|
||
|
|
||
|
public static int c(int i, long j) {
|
||
|
return k(Nvr.c(i, 0)) + d(j);
|
||
|
}
|
||
|
}
|