Class CodedOutputStreamWriter
java.lang.Object
com.google.protobuf.CodedOutputStreamWriter
A writer that performs serialization of protobuf message fields.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CodedOutputStreamWriterforCodedOutput(CodedOutputStream output) intvoidwriteBool(int fieldNumber, boolean value) voidwriteBoolList(int fieldNumber, List<Boolean> value, boolean packed) private voidwriteBoolListInternal(int fieldNumber, BooleanArrayList value, boolean packed) private voidwriteBoolListInternal(int fieldNumber, List<Boolean> value, boolean packed) voidwriteBytes(int fieldNumber, ByteString value) voidwriteBytesList(int fieldNumber, List<ByteString> value) private <V> voidwriteDeterministicBooleanMapEntry(int fieldNumber, boolean key, V value, MapEntryLite.Metadata<Boolean, V> metadata) private <V> voidwriteDeterministicIntegerMap(int fieldNumber, MapEntryLite.Metadata<Integer, V> metadata, Map<Integer, V> map) private <V> voidwriteDeterministicLongMap(int fieldNumber, MapEntryLite.Metadata<Long, V> metadata, Map<Long, V> map) private <K,V> void writeDeterministicMap(int fieldNumber, MapEntryLite.Metadata<K, V> metadata, Map<K, V> map) private <V> voidwriteDeterministicStringMap(int fieldNumber, MapEntryLite.Metadata<String, V> metadata, Map<String, V> map) voidwriteDouble(int fieldNumber, double value) voidwriteDoubleList(int fieldNumber, List<Double> value, boolean packed) private voidwriteDoubleListInternal(int fieldNumber, DoubleArrayList value, boolean packed) private voidwriteDoubleListInternal(int fieldNumber, List<Double> value, boolean packed) voidwriteEndGroup(int fieldNumber) Deprecated.voidwriteEnum(int fieldNumber, int value) voidwriteEnumList(int fieldNumber, List<Integer> value, boolean packed) private voidwriteEnumListInternal(int fieldNumber, IntArrayList value, boolean packed) private voidwriteEnumListInternal(int fieldNumber, List<Integer> value, boolean packed) voidwriteFixed32(int fieldNumber, int value) voidwriteFixed32List(int fieldNumber, List<Integer> value, boolean packed) private voidwriteFixed32ListInternal(int fieldNumber, IntArrayList value, boolean packed) private voidwriteFixed32ListInternal(int fieldNumber, List<Integer> value, boolean packed) voidwriteFixed64(int fieldNumber, long value) voidwriteFixed64List(int fieldNumber, List<Long> value, boolean packed) private voidwriteFixed64ListInternal(int fieldNumber, LongArrayList value, boolean packed) private voidwriteFixed64ListInternal(int fieldNumber, List<Long> value, boolean packed) voidwriteFloat(int fieldNumber, float value) voidwriteFloatList(int fieldNumber, List<Float> value, boolean packed) private voidwriteFloatListInternal(int fieldNumber, FloatArrayList value, boolean packed) private voidwriteFloatListInternal(int fieldNumber, List<Float> value, boolean packed) voidwriteGroup(int fieldNumber, Object value) Deprecated.voidwriteGroup(int fieldNumber, Object value, Schema schema) voidwriteGroupList(int fieldNumber, List<?> value) Deprecated.voidwriteGroupList(int fieldNumber, List<?> value, Schema schema) voidwriteInt32(int fieldNumber, int value) voidwriteInt32List(int fieldNumber, List<Integer> value, boolean packed) private voidwriteInt32ListInternal(int fieldNumber, IntArrayList value, boolean packed) private voidwriteInt32ListInternal(int fieldNumber, List<Integer> value, boolean packed) voidwriteInt64(int fieldNumber, long value) voidwriteInt64List(int fieldNumber, List<Long> value, boolean packed) private voidwriteInt64ListInternal(int fieldNumber, LongArrayList value, boolean packed) private voidwriteInt64ListInternal(int fieldNumber, List<Long> value, boolean packed) private voidwriteLazyString(int fieldNumber, Object value) <K,V> void writeMap(int fieldNumber, MapEntryLite.Metadata<K, V> metadata, Map<K, V> map) voidwriteMessage(int fieldNumber, Object value) voidwriteMessage(int fieldNumber, Object value, Schema schema) voidwriteMessageList(int fieldNumber, List<?> value) voidwriteMessageList(int fieldNumber, List<?> value, Schema schema) final voidwriteMessageSetItem(int fieldNumber, Object value) voidwriteSFixed32(int fieldNumber, int value) voidwriteSFixed32List(int fieldNumber, List<Integer> value, boolean packed) private voidwriteSFixed32ListInternal(int fieldNumber, IntArrayList value, boolean packed) private voidwriteSFixed32ListInternal(int fieldNumber, List<Integer> value, boolean packed) voidwriteSFixed64(int fieldNumber, long value) voidwriteSFixed64List(int fieldNumber, List<Long> value, boolean packed) private voidwriteSFixed64ListInternal(int fieldNumber, LongArrayList value, boolean packed) private voidwriteSFixed64ListInternal(int fieldNumber, List<Long> value, boolean packed) voidwriteSInt32(int fieldNumber, int value) voidwriteSInt32List(int fieldNumber, List<Integer> value, boolean packed) private voidwriteSInt32ListInternal(int fieldNumber, IntArrayList value, boolean packed) voidwriteSInt32ListInternal(int fieldNumber, List<Integer> value, boolean packed) voidwriteSInt64(int fieldNumber, long value) voidwriteSInt64List(int fieldNumber, List<Long> value, boolean packed) private voidwriteSInt64ListInternal(int fieldNumber, LongArrayList value, boolean packed) private voidwriteSInt64ListInternal(int fieldNumber, List<Long> value, boolean packed) voidwriteStartGroup(int fieldNumber) Deprecated.voidwriteString(int fieldNumber, String value) voidwriteStringList(int fieldNumber, List<String> value) voidwriteUInt32(int fieldNumber, int value) voidwriteUInt32List(int fieldNumber, List<Integer> value, boolean packed) private voidwriteUInt32ListInternal(int fieldNumber, IntArrayList value, boolean packed) voidwriteUInt32ListInternal(int fieldNumber, List<Integer> value, boolean packed) voidwriteUInt64(int fieldNumber, long value) voidwriteUInt64List(int fieldNumber, List<Long> value, boolean packed) private voidwriteUInt64ListInternal(int fieldNumber, LongArrayList value, boolean packed) private voidwriteUInt64ListInternal(int fieldNumber, List<Long> value, boolean packed)
-
Field Details
-
output
-
-
Constructor Details
-
CodedOutputStreamWriter
-
-
Method Details
-
forCodedOutput
-
getTotalBytesWritten
public int getTotalBytesWritten() -
writeSFixed32
- Throws:
IOException
-
writeInt64
- Throws:
IOException
-
writeSFixed64
- Throws:
IOException
-
writeFloat
- Throws:
IOException
-
writeDouble
- Throws:
IOException
-
writeEnum
- Throws:
IOException
-
writeUInt64
- Throws:
IOException
-
writeInt32
- Throws:
IOException
-
writeFixed64
- Throws:
IOException
-
writeFixed32
- Throws:
IOException
-
writeBool
- Throws:
IOException
-
writeString
- Throws:
IOException
-
writeBytes
- Throws:
IOException
-
writeUInt32
- Throws:
IOException
-
writeSInt32
- Throws:
IOException
-
writeSInt64
- Throws:
IOException
-
writeMessage
- Throws:
IOException
-
writeMessage
- Throws:
IOException
-
writeGroup
Deprecated.- Throws:
IOException
-
writeGroup
- Throws:
IOException
-
writeStartGroup
Deprecated.- Throws:
IOException
-
writeEndGroup
Deprecated.- Throws:
IOException
-
writeMessageSetItem
- Throws:
IOException
-
writeInt32List
- Throws:
IOException
-
writeInt32ListInternal
private void writeInt32ListInternal(int fieldNumber, IntArrayList value, boolean packed) throws IOException - Throws:
IOException
-
writeInt32ListInternal
private void writeInt32ListInternal(int fieldNumber, List<Integer> value, boolean packed) throws IOException - Throws:
IOException
-
writeFixed32List
public void writeFixed32List(int fieldNumber, List<Integer> value, boolean packed) throws IOException - Throws:
IOException
-
writeFixed32ListInternal
private void writeFixed32ListInternal(int fieldNumber, IntArrayList value, boolean packed) throws IOException - Throws:
IOException
-
writeFixed32ListInternal
private void writeFixed32ListInternal(int fieldNumber, List<Integer> value, boolean packed) throws IOException - Throws:
IOException
-
writeInt64List
- Throws:
IOException
-
writeInt64ListInternal
private void writeInt64ListInternal(int fieldNumber, LongArrayList value, boolean packed) throws IOException - Throws:
IOException
-
writeInt64ListInternal
private void writeInt64ListInternal(int fieldNumber, List<Long> value, boolean packed) throws IOException - Throws:
IOException
-
writeUInt64List
- Throws:
IOException
-
writeUInt64ListInternal
private void writeUInt64ListInternal(int fieldNumber, LongArrayList value, boolean packed) throws IOException - Throws:
IOException
-
writeUInt64ListInternal
private void writeUInt64ListInternal(int fieldNumber, List<Long> value, boolean packed) throws IOException - Throws:
IOException
-
writeFixed64List
- Throws:
IOException
-
writeFixed64ListInternal
private void writeFixed64ListInternal(int fieldNumber, LongArrayList value, boolean packed) throws IOException - Throws:
IOException
-
writeFixed64ListInternal
private void writeFixed64ListInternal(int fieldNumber, List<Long> value, boolean packed) throws IOException - Throws:
IOException
-
writeFloatList
- Throws:
IOException
-
writeFloatListInternal
private void writeFloatListInternal(int fieldNumber, FloatArrayList value, boolean packed) throws IOException - Throws:
IOException
-
writeFloatListInternal
private void writeFloatListInternal(int fieldNumber, List<Float> value, boolean packed) throws IOException - Throws:
IOException
-
writeDoubleList
- Throws:
IOException
-
writeDoubleListInternal
private void writeDoubleListInternal(int fieldNumber, DoubleArrayList value, boolean packed) throws IOException - Throws:
IOException
-
writeDoubleListInternal
private void writeDoubleListInternal(int fieldNumber, List<Double> value, boolean packed) throws IOException - Throws:
IOException
-
writeEnumList
- Throws:
IOException
-
writeEnumListInternal
private void writeEnumListInternal(int fieldNumber, IntArrayList value, boolean packed) throws IOException - Throws:
IOException
-
writeEnumListInternal
private void writeEnumListInternal(int fieldNumber, List<Integer> value, boolean packed) throws IOException - Throws:
IOException
-
writeBoolList
- Throws:
IOException
-
writeBoolListInternal
private void writeBoolListInternal(int fieldNumber, BooleanArrayList value, boolean packed) throws IOException - Throws:
IOException
-
writeBoolListInternal
private void writeBoolListInternal(int fieldNumber, List<Boolean> value, boolean packed) throws IOException - Throws:
IOException
-
writeStringList
- Throws:
IOException
-
writeLazyString
- Throws:
IOException
-
writeBytesList
- Throws:
IOException
-
writeUInt32List
public void writeUInt32List(int fieldNumber, List<Integer> value, boolean packed) throws IOException - Throws:
IOException
-
writeUInt32ListInternal
private void writeUInt32ListInternal(int fieldNumber, IntArrayList value, boolean packed) throws IOException - Throws:
IOException
-
writeUInt32ListInternal
public void writeUInt32ListInternal(int fieldNumber, List<Integer> value, boolean packed) throws IOException - Throws:
IOException
-
writeSFixed32List
public void writeSFixed32List(int fieldNumber, List<Integer> value, boolean packed) throws IOException - Throws:
IOException
-
writeSFixed32ListInternal
private void writeSFixed32ListInternal(int fieldNumber, IntArrayList value, boolean packed) throws IOException - Throws:
IOException
-
writeSFixed32ListInternal
private void writeSFixed32ListInternal(int fieldNumber, List<Integer> value, boolean packed) throws IOException - Throws:
IOException
-
writeSFixed64List
- Throws:
IOException
-
writeSFixed64ListInternal
private void writeSFixed64ListInternal(int fieldNumber, LongArrayList value, boolean packed) throws IOException - Throws:
IOException
-
writeSFixed64ListInternal
private void writeSFixed64ListInternal(int fieldNumber, List<Long> value, boolean packed) throws IOException - Throws:
IOException
-
writeSInt32List
public void writeSInt32List(int fieldNumber, List<Integer> value, boolean packed) throws IOException - Throws:
IOException
-
writeSInt32ListInternal
private void writeSInt32ListInternal(int fieldNumber, IntArrayList value, boolean packed) throws IOException - Throws:
IOException
-
writeSInt32ListInternal
public void writeSInt32ListInternal(int fieldNumber, List<Integer> value, boolean packed) throws IOException - Throws:
IOException
-
writeSInt64List
- Throws:
IOException
-
writeSInt64ListInternal
private void writeSInt64ListInternal(int fieldNumber, LongArrayList value, boolean packed) throws IOException - Throws:
IOException
-
writeSInt64ListInternal
private void writeSInt64ListInternal(int fieldNumber, List<Long> value, boolean packed) throws IOException - Throws:
IOException
-
writeMessageList
- Throws:
IOException
-
writeMessageList
- Throws:
IOException
-
writeGroupList
Deprecated.- Throws:
IOException
-
writeGroupList
- Throws:
IOException
-
writeMap
public <K,V> void writeMap(int fieldNumber, MapEntryLite.Metadata<K, V> metadata, Map<K, throws IOExceptionV> map) - Throws:
IOException
-
writeDeterministicMap
private <K,V> void writeDeterministicMap(int fieldNumber, MapEntryLite.Metadata<K, V> metadata, Map<K, throws IOExceptionV> map) - Throws:
IOException
-
writeDeterministicBooleanMapEntry
private <V> void writeDeterministicBooleanMapEntry(int fieldNumber, boolean key, V value, MapEntryLite.Metadata<Boolean, V> metadata) throws IOException- Throws:
IOException
-
writeDeterministicIntegerMap
private <V> void writeDeterministicIntegerMap(int fieldNumber, MapEntryLite.Metadata<Integer, V> metadata, Map<Integer, throws IOExceptionV> map) - Throws:
IOException
-
writeDeterministicLongMap
private <V> void writeDeterministicLongMap(int fieldNumber, MapEntryLite.Metadata<Long, V> metadata, Map<Long, throws IOExceptionV> map) - Throws:
IOException
-
writeDeterministicStringMap
private <V> void writeDeterministicStringMap(int fieldNumber, MapEntryLite.Metadata<String, V> metadata, Map<String, throws IOExceptionV> map) - Throws:
IOException
-