- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
696 lines
24 KiB
Java
696 lines
24 KiB
Java
package com.google.protobuf;
|
|
|
|
import com.google.protobuf.MapEntryLite;
|
|
import com.google.protobuf.WireFormat;
|
|
import com.google.protobuf.Writer;
|
|
import java.io.IOException;
|
|
import java.util.Arrays;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class CodedOutputStreamWriter implements Writer {
|
|
private final CodedOutputStream output;
|
|
|
|
public static CodedOutputStreamWriter forCodedOutput(CodedOutputStream codedOutputStream) {
|
|
CodedOutputStreamWriter codedOutputStreamWriter = codedOutputStream.wrapper;
|
|
return codedOutputStreamWriter != null ? codedOutputStreamWriter : new CodedOutputStreamWriter(codedOutputStream);
|
|
}
|
|
|
|
private CodedOutputStreamWriter(CodedOutputStream codedOutputStream) {
|
|
CodedOutputStream codedOutputStream2 = (CodedOutputStream) Internal.checkNotNull(codedOutputStream, "output");
|
|
this.output = codedOutputStream2;
|
|
codedOutputStream2.wrapper = this;
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public Writer.FieldOrder fieldOrder() {
|
|
return Writer.FieldOrder.ASCENDING;
|
|
}
|
|
|
|
public int getTotalBytesWritten() {
|
|
return this.output.getTotalBytesWritten();
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeSFixed32(int i, int i2) throws IOException {
|
|
this.output.writeSFixed32(i, i2);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeInt64(int i, long j) throws IOException {
|
|
this.output.writeInt64(i, j);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeSFixed64(int i, long j) throws IOException {
|
|
this.output.writeSFixed64(i, j);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeFloat(int i, float f) throws IOException {
|
|
this.output.writeFloat(i, f);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeDouble(int i, double d) throws IOException {
|
|
this.output.writeDouble(i, d);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeEnum(int i, int i2) throws IOException {
|
|
this.output.writeEnum(i, i2);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeUInt64(int i, long j) throws IOException {
|
|
this.output.writeUInt64(i, j);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeInt32(int i, int i2) throws IOException {
|
|
this.output.writeInt32(i, i2);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeFixed64(int i, long j) throws IOException {
|
|
this.output.writeFixed64(i, j);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeFixed32(int i, int i2) throws IOException {
|
|
this.output.writeFixed32(i, i2);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeBool(int i, boolean z) throws IOException {
|
|
this.output.writeBool(i, z);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeString(int i, String str) throws IOException {
|
|
this.output.writeString(i, str);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeBytes(int i, ByteString byteString) throws IOException {
|
|
this.output.writeBytes(i, byteString);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeUInt32(int i, int i2) throws IOException {
|
|
this.output.writeUInt32(i, i2);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeSInt32(int i, int i2) throws IOException {
|
|
this.output.writeSInt32(i, i2);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeSInt64(int i, long j) throws IOException {
|
|
this.output.writeSInt64(i, j);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeMessage(int i, Object obj) throws IOException {
|
|
this.output.writeMessage(i, (MessageLite) obj);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeMessage(int i, Object obj, Schema schema) throws IOException {
|
|
this.output.writeMessage(i, (MessageLite) obj, schema);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
@Deprecated
|
|
public void writeGroup(int i, Object obj) throws IOException {
|
|
this.output.writeGroup(i, (MessageLite) obj);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeGroup(int i, Object obj, Schema schema) throws IOException {
|
|
this.output.writeGroup(i, (MessageLite) obj, schema);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
@Deprecated
|
|
public void writeStartGroup(int i) throws IOException {
|
|
this.output.writeTag(i, 3);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
@Deprecated
|
|
public void writeEndGroup(int i) throws IOException {
|
|
this.output.writeTag(i, 4);
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public final void writeMessageSetItem(int i, Object obj) throws IOException {
|
|
if (obj instanceof ByteString) {
|
|
this.output.writeRawMessageSetExtension(i, (ByteString) obj);
|
|
} else {
|
|
this.output.writeMessageSetExtension(i, (MessageLite) obj);
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeInt32List(int i, List<Integer> list, boolean z) throws IOException {
|
|
int i2 = 0;
|
|
if (z) {
|
|
this.output.writeTag(i, 2);
|
|
int i3 = 0;
|
|
for (int i4 = 0; i4 < list.size(); i4++) {
|
|
i3 += CodedOutputStream.computeInt32SizeNoTag(list.get(i4).intValue());
|
|
}
|
|
this.output.writeUInt32NoTag(i3);
|
|
while (i2 < list.size()) {
|
|
this.output.writeInt32NoTag(list.get(i2).intValue());
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeInt32(i, list.get(i2).intValue());
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeFixed32List(int i, List<Integer> list, boolean z) throws IOException {
|
|
int i2 = 0;
|
|
if (z) {
|
|
this.output.writeTag(i, 2);
|
|
int i3 = 0;
|
|
for (int i4 = 0; i4 < list.size(); i4++) {
|
|
i3 += CodedOutputStream.computeFixed32SizeNoTag(list.get(i4).intValue());
|
|
}
|
|
this.output.writeUInt32NoTag(i3);
|
|
while (i2 < list.size()) {
|
|
this.output.writeFixed32NoTag(list.get(i2).intValue());
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeFixed32(i, list.get(i2).intValue());
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeInt64List(int i, List<Long> list, boolean z) throws IOException {
|
|
int i2 = 0;
|
|
if (z) {
|
|
this.output.writeTag(i, 2);
|
|
int i3 = 0;
|
|
for (int i4 = 0; i4 < list.size(); i4++) {
|
|
i3 += CodedOutputStream.computeInt64SizeNoTag(list.get(i4).longValue());
|
|
}
|
|
this.output.writeUInt32NoTag(i3);
|
|
while (i2 < list.size()) {
|
|
this.output.writeInt64NoTag(list.get(i2).longValue());
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeInt64(i, list.get(i2).longValue());
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeUInt64List(int i, List<Long> list, boolean z) throws IOException {
|
|
int i2 = 0;
|
|
if (z) {
|
|
this.output.writeTag(i, 2);
|
|
int i3 = 0;
|
|
for (int i4 = 0; i4 < list.size(); i4++) {
|
|
i3 += CodedOutputStream.computeUInt64SizeNoTag(list.get(i4).longValue());
|
|
}
|
|
this.output.writeUInt32NoTag(i3);
|
|
while (i2 < list.size()) {
|
|
this.output.writeUInt64NoTag(list.get(i2).longValue());
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeUInt64(i, list.get(i2).longValue());
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeFixed64List(int i, List<Long> list, boolean z) throws IOException {
|
|
int i2 = 0;
|
|
if (z) {
|
|
this.output.writeTag(i, 2);
|
|
int i3 = 0;
|
|
for (int i4 = 0; i4 < list.size(); i4++) {
|
|
i3 += CodedOutputStream.computeFixed64SizeNoTag(list.get(i4).longValue());
|
|
}
|
|
this.output.writeUInt32NoTag(i3);
|
|
while (i2 < list.size()) {
|
|
this.output.writeFixed64NoTag(list.get(i2).longValue());
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeFixed64(i, list.get(i2).longValue());
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeFloatList(int i, List<Float> list, boolean z) throws IOException {
|
|
int i2 = 0;
|
|
if (z) {
|
|
this.output.writeTag(i, 2);
|
|
int i3 = 0;
|
|
for (int i4 = 0; i4 < list.size(); i4++) {
|
|
i3 += CodedOutputStream.computeFloatSizeNoTag(list.get(i4).floatValue());
|
|
}
|
|
this.output.writeUInt32NoTag(i3);
|
|
while (i2 < list.size()) {
|
|
this.output.writeFloatNoTag(list.get(i2).floatValue());
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeFloat(i, list.get(i2).floatValue());
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeDoubleList(int i, List<Double> list, boolean z) throws IOException {
|
|
int i2 = 0;
|
|
if (z) {
|
|
this.output.writeTag(i, 2);
|
|
int i3 = 0;
|
|
for (int i4 = 0; i4 < list.size(); i4++) {
|
|
i3 += CodedOutputStream.computeDoubleSizeNoTag(list.get(i4).doubleValue());
|
|
}
|
|
this.output.writeUInt32NoTag(i3);
|
|
while (i2 < list.size()) {
|
|
this.output.writeDoubleNoTag(list.get(i2).doubleValue());
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeDouble(i, list.get(i2).doubleValue());
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeEnumList(int i, List<Integer> list, boolean z) throws IOException {
|
|
int i2 = 0;
|
|
if (z) {
|
|
this.output.writeTag(i, 2);
|
|
int i3 = 0;
|
|
for (int i4 = 0; i4 < list.size(); i4++) {
|
|
i3 += CodedOutputStream.computeEnumSizeNoTag(list.get(i4).intValue());
|
|
}
|
|
this.output.writeUInt32NoTag(i3);
|
|
while (i2 < list.size()) {
|
|
this.output.writeEnumNoTag(list.get(i2).intValue());
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeEnum(i, list.get(i2).intValue());
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeBoolList(int i, List<Boolean> list, boolean z) throws IOException {
|
|
int i2 = 0;
|
|
if (z) {
|
|
this.output.writeTag(i, 2);
|
|
int i3 = 0;
|
|
for (int i4 = 0; i4 < list.size(); i4++) {
|
|
i3 += CodedOutputStream.computeBoolSizeNoTag(list.get(i4).booleanValue());
|
|
}
|
|
this.output.writeUInt32NoTag(i3);
|
|
while (i2 < list.size()) {
|
|
this.output.writeBoolNoTag(list.get(i2).booleanValue());
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeBool(i, list.get(i2).booleanValue());
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeStringList(int i, List<String> list) throws IOException {
|
|
int i2 = 0;
|
|
if (list instanceof LazyStringList) {
|
|
LazyStringList lazyStringList = (LazyStringList) list;
|
|
while (i2 < list.size()) {
|
|
writeLazyString(i, lazyStringList.getRaw(i2));
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeString(i, list.get(i2));
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
private void writeLazyString(int i, Object obj) throws IOException {
|
|
if (obj instanceof String) {
|
|
this.output.writeString(i, (String) obj);
|
|
} else {
|
|
this.output.writeBytes(i, (ByteString) obj);
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeBytesList(int i, List<ByteString> list) throws IOException {
|
|
for (int i2 = 0; i2 < list.size(); i2++) {
|
|
this.output.writeBytes(i, list.get(i2));
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeUInt32List(int i, List<Integer> list, boolean z) throws IOException {
|
|
int i2 = 0;
|
|
if (z) {
|
|
this.output.writeTag(i, 2);
|
|
int i3 = 0;
|
|
for (int i4 = 0; i4 < list.size(); i4++) {
|
|
i3 += CodedOutputStream.computeUInt32SizeNoTag(list.get(i4).intValue());
|
|
}
|
|
this.output.writeUInt32NoTag(i3);
|
|
while (i2 < list.size()) {
|
|
this.output.writeUInt32NoTag(list.get(i2).intValue());
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeUInt32(i, list.get(i2).intValue());
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeSFixed32List(int i, List<Integer> list, boolean z) throws IOException {
|
|
int i2 = 0;
|
|
if (z) {
|
|
this.output.writeTag(i, 2);
|
|
int i3 = 0;
|
|
for (int i4 = 0; i4 < list.size(); i4++) {
|
|
i3 += CodedOutputStream.computeSFixed32SizeNoTag(list.get(i4).intValue());
|
|
}
|
|
this.output.writeUInt32NoTag(i3);
|
|
while (i2 < list.size()) {
|
|
this.output.writeSFixed32NoTag(list.get(i2).intValue());
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeSFixed32(i, list.get(i2).intValue());
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeSFixed64List(int i, List<Long> list, boolean z) throws IOException {
|
|
int i2 = 0;
|
|
if (z) {
|
|
this.output.writeTag(i, 2);
|
|
int i3 = 0;
|
|
for (int i4 = 0; i4 < list.size(); i4++) {
|
|
i3 += CodedOutputStream.computeSFixed64SizeNoTag(list.get(i4).longValue());
|
|
}
|
|
this.output.writeUInt32NoTag(i3);
|
|
while (i2 < list.size()) {
|
|
this.output.writeSFixed64NoTag(list.get(i2).longValue());
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeSFixed64(i, list.get(i2).longValue());
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeSInt32List(int i, List<Integer> list, boolean z) throws IOException {
|
|
int i2 = 0;
|
|
if (z) {
|
|
this.output.writeTag(i, 2);
|
|
int i3 = 0;
|
|
for (int i4 = 0; i4 < list.size(); i4++) {
|
|
i3 += CodedOutputStream.computeSInt32SizeNoTag(list.get(i4).intValue());
|
|
}
|
|
this.output.writeUInt32NoTag(i3);
|
|
while (i2 < list.size()) {
|
|
this.output.writeSInt32NoTag(list.get(i2).intValue());
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeSInt32(i, list.get(i2).intValue());
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeSInt64List(int i, List<Long> list, boolean z) throws IOException {
|
|
int i2 = 0;
|
|
if (z) {
|
|
this.output.writeTag(i, 2);
|
|
int i3 = 0;
|
|
for (int i4 = 0; i4 < list.size(); i4++) {
|
|
i3 += CodedOutputStream.computeSInt64SizeNoTag(list.get(i4).longValue());
|
|
}
|
|
this.output.writeUInt32NoTag(i3);
|
|
while (i2 < list.size()) {
|
|
this.output.writeSInt64NoTag(list.get(i2).longValue());
|
|
i2++;
|
|
}
|
|
return;
|
|
}
|
|
while (i2 < list.size()) {
|
|
this.output.writeSInt64(i, list.get(i2).longValue());
|
|
i2++;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeMessageList(int i, List<?> list) throws IOException {
|
|
for (int i2 = 0; i2 < list.size(); i2++) {
|
|
writeMessage(i, list.get(i2));
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeMessageList(int i, List<?> list, Schema schema) throws IOException {
|
|
for (int i2 = 0; i2 < list.size(); i2++) {
|
|
writeMessage(i, list.get(i2), schema);
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
@Deprecated
|
|
public void writeGroupList(int i, List<?> list) throws IOException {
|
|
for (int i2 = 0; i2 < list.size(); i2++) {
|
|
writeGroup(i, list.get(i2));
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public void writeGroupList(int i, List<?> list, Schema schema) throws IOException {
|
|
for (int i2 = 0; i2 < list.size(); i2++) {
|
|
writeGroup(i, list.get(i2), schema);
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.Writer
|
|
public <K, V> void writeMap(int i, MapEntryLite.Metadata metadata, Map<K, V> map) throws IOException {
|
|
if (this.output.isSerializationDeterministic()) {
|
|
writeDeterministicMap(i, metadata, map);
|
|
return;
|
|
}
|
|
for (Map.Entry<K, V> entry : map.entrySet()) {
|
|
this.output.writeTag(i, 2);
|
|
this.output.writeUInt32NoTag(MapEntryLite.computeSerializedSize(metadata, entry.getKey(), entry.getValue()));
|
|
MapEntryLite.writeTo(this.output, metadata, entry.getKey(), entry.getValue());
|
|
}
|
|
}
|
|
|
|
/* renamed from: com.google.protobuf.CodedOutputStreamWriter$1, reason: invalid class name */
|
|
public static /* synthetic */ class AnonymousClass1 {
|
|
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$WireFormat$FieldType;
|
|
|
|
static {
|
|
int[] iArr = new int[WireFormat.FieldType.values().length];
|
|
$SwitchMap$com$google$protobuf$WireFormat$FieldType = iArr;
|
|
try {
|
|
iArr[WireFormat.FieldType.BOOL.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.FIXED32.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
try {
|
|
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.INT32.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused3) {
|
|
}
|
|
try {
|
|
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SFIXED32.ordinal()] = 4;
|
|
} catch (NoSuchFieldError unused4) {
|
|
}
|
|
try {
|
|
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SINT32.ordinal()] = 5;
|
|
} catch (NoSuchFieldError unused5) {
|
|
}
|
|
try {
|
|
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.UINT32.ordinal()] = 6;
|
|
} catch (NoSuchFieldError unused6) {
|
|
}
|
|
try {
|
|
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.FIXED64.ordinal()] = 7;
|
|
} catch (NoSuchFieldError unused7) {
|
|
}
|
|
try {
|
|
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.INT64.ordinal()] = 8;
|
|
} catch (NoSuchFieldError unused8) {
|
|
}
|
|
try {
|
|
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SFIXED64.ordinal()] = 9;
|
|
} catch (NoSuchFieldError unused9) {
|
|
}
|
|
try {
|
|
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SINT64.ordinal()] = 10;
|
|
} catch (NoSuchFieldError unused10) {
|
|
}
|
|
try {
|
|
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.UINT64.ordinal()] = 11;
|
|
} catch (NoSuchFieldError unused11) {
|
|
}
|
|
try {
|
|
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.STRING.ordinal()] = 12;
|
|
} catch (NoSuchFieldError unused12) {
|
|
}
|
|
}
|
|
}
|
|
|
|
private <K, V> void writeDeterministicMap(int i, MapEntryLite.Metadata metadata, Map<K, V> map) throws IOException {
|
|
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$FieldType[metadata.keyType.ordinal()]) {
|
|
case 1:
|
|
V v = map.get(Boolean.FALSE);
|
|
if (v != null) {
|
|
writeDeterministicBooleanMapEntry(i, false, v, metadata);
|
|
}
|
|
V v2 = map.get(Boolean.TRUE);
|
|
if (v2 != null) {
|
|
writeDeterministicBooleanMapEntry(i, true, v2, metadata);
|
|
return;
|
|
}
|
|
return;
|
|
case 2:
|
|
case 3:
|
|
case 4:
|
|
case 5:
|
|
case 6:
|
|
writeDeterministicIntegerMap(i, metadata, map);
|
|
return;
|
|
case 7:
|
|
case 8:
|
|
case 9:
|
|
case 10:
|
|
case 11:
|
|
writeDeterministicLongMap(i, metadata, map);
|
|
return;
|
|
case 12:
|
|
writeDeterministicStringMap(i, metadata, map);
|
|
return;
|
|
default:
|
|
throw new IllegalArgumentException("does not support key type: " + metadata.keyType);
|
|
}
|
|
}
|
|
|
|
private <V> void writeDeterministicBooleanMapEntry(int i, boolean z, V v, MapEntryLite.Metadata metadata) throws IOException {
|
|
this.output.writeTag(i, 2);
|
|
this.output.writeUInt32NoTag(MapEntryLite.computeSerializedSize(metadata, Boolean.valueOf(z), v));
|
|
MapEntryLite.writeTo(this.output, metadata, Boolean.valueOf(z), v);
|
|
}
|
|
|
|
private <V> void writeDeterministicIntegerMap(int i, MapEntryLite.Metadata metadata, Map<Integer, V> map) throws IOException {
|
|
int size = map.size();
|
|
int[] iArr = new int[size];
|
|
Iterator<Integer> it = map.keySet().iterator();
|
|
int i2 = 0;
|
|
while (it.hasNext()) {
|
|
iArr[i2] = it.next().intValue();
|
|
i2++;
|
|
}
|
|
Arrays.sort(iArr);
|
|
for (int i3 = 0; i3 < size; i3++) {
|
|
int i4 = iArr[i3];
|
|
V v = map.get(Integer.valueOf(i4));
|
|
this.output.writeTag(i, 2);
|
|
this.output.writeUInt32NoTag(MapEntryLite.computeSerializedSize(metadata, Integer.valueOf(i4), v));
|
|
MapEntryLite.writeTo(this.output, metadata, Integer.valueOf(i4), v);
|
|
}
|
|
}
|
|
|
|
private <V> void writeDeterministicLongMap(int i, MapEntryLite.Metadata metadata, Map<Long, V> map) throws IOException {
|
|
int size = map.size();
|
|
long[] jArr = new long[size];
|
|
Iterator<Long> it = map.keySet().iterator();
|
|
int i2 = 0;
|
|
while (it.hasNext()) {
|
|
jArr[i2] = it.next().longValue();
|
|
i2++;
|
|
}
|
|
Arrays.sort(jArr);
|
|
for (int i3 = 0; i3 < size; i3++) {
|
|
long j = jArr[i3];
|
|
V v = map.get(Long.valueOf(j));
|
|
this.output.writeTag(i, 2);
|
|
this.output.writeUInt32NoTag(MapEntryLite.computeSerializedSize(metadata, Long.valueOf(j), v));
|
|
MapEntryLite.writeTo(this.output, metadata, Long.valueOf(j), v);
|
|
}
|
|
}
|
|
|
|
private <V> void writeDeterministicStringMap(int i, MapEntryLite.Metadata metadata, Map<String, V> map) throws IOException {
|
|
int size = map.size();
|
|
String[] strArr = new String[size];
|
|
Iterator<String> it = map.keySet().iterator();
|
|
int i2 = 0;
|
|
while (it.hasNext()) {
|
|
strArr[i2] = it.next();
|
|
i2++;
|
|
}
|
|
Arrays.sort(strArr);
|
|
for (int i3 = 0; i3 < size; i3++) {
|
|
String str = strArr[i3];
|
|
V v = map.get(str);
|
|
this.output.writeTag(i, 2);
|
|
this.output.writeUInt32NoTag(MapEntryLite.computeSerializedSize(metadata, str, v));
|
|
MapEntryLite.writeTo(this.output, metadata, str, v);
|
|
}
|
|
}
|
|
}
|