Interface Writer

    • Method Detail

      • writeSFixed32

        void writeSFixed32​(int fieldNumber,
                           int value)
                    throws java.io.IOException
        Writes a field of type FieldType.SFIXED32.
        Throws:
        java.io.IOException
      • writeInt64

        void writeInt64​(int fieldNumber,
                        long value)
                 throws java.io.IOException
        Writes a field of type FieldType.INT64.
        Throws:
        java.io.IOException
      • writeSFixed64

        void writeSFixed64​(int fieldNumber,
                           long value)
                    throws java.io.IOException
        Writes a field of type FieldType.SFIXED64.
        Throws:
        java.io.IOException
      • writeFloat

        void writeFloat​(int fieldNumber,
                        float value)
                 throws java.io.IOException
        Writes a field of type FieldType.FLOAT.
        Throws:
        java.io.IOException
      • writeDouble

        void writeDouble​(int fieldNumber,
                         double value)
                  throws java.io.IOException
        Writes a field of type FieldType.DOUBLE.
        Throws:
        java.io.IOException
      • writeEnum

        void writeEnum​(int fieldNumber,
                       int value)
                throws java.io.IOException
        Writes a field of type FieldType.ENUM.
        Throws:
        java.io.IOException
      • writeUInt64

        void writeUInt64​(int fieldNumber,
                         long value)
                  throws java.io.IOException
        Writes a field of type FieldType.UINT64.
        Throws:
        java.io.IOException
      • writeInt32

        void writeInt32​(int fieldNumber,
                        int value)
                 throws java.io.IOException
        Writes a field of type FieldType.INT32.
        Throws:
        java.io.IOException
      • writeFixed64

        void writeFixed64​(int fieldNumber,
                          long value)
                   throws java.io.IOException
        Writes a field of type FieldType.FIXED64.
        Throws:
        java.io.IOException
      • writeFixed32

        void writeFixed32​(int fieldNumber,
                          int value)
                   throws java.io.IOException
        Writes a field of type FieldType.FIXED32.
        Throws:
        java.io.IOException
      • writeBool

        void writeBool​(int fieldNumber,
                       boolean value)
                throws java.io.IOException
        Writes a field of type FieldType.BOOL.
        Throws:
        java.io.IOException
      • writeString

        void writeString​(int fieldNumber,
                         java.lang.String value)
                  throws java.io.IOException
        Writes a field of type FieldType.STRING.
        Throws:
        java.io.IOException
      • writeBytes

        void writeBytes​(int fieldNumber,
                        ByteString value)
                 throws java.io.IOException
        Writes a field of type FieldType.BYTES.
        Throws:
        java.io.IOException
      • writeUInt32

        void writeUInt32​(int fieldNumber,
                         int value)
                  throws java.io.IOException
        Writes a field of type FieldType.UINT32.
        Throws:
        java.io.IOException
      • writeSInt32

        void writeSInt32​(int fieldNumber,
                         int value)
                  throws java.io.IOException
        Writes a field of type FieldType.SINT32.
        Throws:
        java.io.IOException
      • writeSInt64

        void writeSInt64​(int fieldNumber,
                         long value)
                  throws java.io.IOException
        Writes a field of type FieldType.SINT64.
        Throws:
        java.io.IOException
      • writeMessage

        void writeMessage​(int fieldNumber,
                          java.lang.Object value)
                   throws java.io.IOException
        Writes a field of type FieldType.MESSAGE.
        Throws:
        java.io.IOException
      • writeMessage

        void writeMessage​(int fieldNumber,
                          java.lang.Object value,
                          Schema schema)
                   throws java.io.IOException
        Writes a field of type FieldType.MESSAGE.
        Throws:
        java.io.IOException
      • writeGroup

        @Deprecated
        void writeGroup​(int fieldNumber,
                        java.lang.Object value)
                 throws java.io.IOException
        Deprecated.
        groups fields are deprecated.
        Writes a field of type FieldType.GROUP.
        Throws:
        java.io.IOException
      • writeGroup

        @Deprecated
        void writeGroup​(int fieldNumber,
                        java.lang.Object value,
                        Schema schema)
                 throws java.io.IOException
        Deprecated.
        groups fields are deprecated.
        Writes a field of type FieldType.GROUP.
        Throws:
        java.io.IOException
      • writeStartGroup

        @Deprecated
        void writeStartGroup​(int fieldNumber)
                      throws java.io.IOException
        Deprecated.
        groups fields are deprecated.
        Writes a single start group tag.
        Throws:
        java.io.IOException
      • writeEndGroup

        @Deprecated
        void writeEndGroup​(int fieldNumber)
                    throws java.io.IOException
        Deprecated.
        groups fields are deprecated.
        Writes a single end group tag.
        Throws:
        java.io.IOException
      • writeInt32List

        void writeInt32List​(int fieldNumber,
                            java.util.List<java.lang.Integer> value,
                            boolean packed)
                     throws java.io.IOException
        Writes a list field of type FieldType.INT32.
        Throws:
        java.io.IOException
      • writeFixed32List

        void writeFixed32List​(int fieldNumber,
                              java.util.List<java.lang.Integer> value,
                              boolean packed)
                       throws java.io.IOException
        Writes a list field of type FieldType.FIXED32.
        Throws:
        java.io.IOException
      • writeInt64List

        void writeInt64List​(int fieldNumber,
                            java.util.List<java.lang.Long> value,
                            boolean packed)
                     throws java.io.IOException
        Writes a list field of type FieldType.INT64.
        Throws:
        java.io.IOException
      • writeUInt64List

        void writeUInt64List​(int fieldNumber,
                             java.util.List<java.lang.Long> value,
                             boolean packed)
                      throws java.io.IOException
        Writes a list field of type FieldType.UINT64.
        Throws:
        java.io.IOException
      • writeFixed64List

        void writeFixed64List​(int fieldNumber,
                              java.util.List<java.lang.Long> value,
                              boolean packed)
                       throws java.io.IOException
        Writes a list field of type FieldType.FIXED64.
        Throws:
        java.io.IOException
      • writeFloatList

        void writeFloatList​(int fieldNumber,
                            java.util.List<java.lang.Float> value,
                            boolean packed)
                     throws java.io.IOException
        Writes a list field of type FieldType.FLOAT.
        Throws:
        java.io.IOException
      • writeDoubleList

        void writeDoubleList​(int fieldNumber,
                             java.util.List<java.lang.Double> value,
                             boolean packed)
                      throws java.io.IOException
        Writes a list field of type FieldType.DOUBLE.
        Throws:
        java.io.IOException
      • writeEnumList

        void writeEnumList​(int fieldNumber,
                           java.util.List<java.lang.Integer> value,
                           boolean packed)
                    throws java.io.IOException
        Writes a list field of type FieldType.ENUM.
        Throws:
        java.io.IOException
      • writeBoolList

        void writeBoolList​(int fieldNumber,
                           java.util.List<java.lang.Boolean> value,
                           boolean packed)
                    throws java.io.IOException
        Writes a list field of type FieldType.BOOL.
        Throws:
        java.io.IOException
      • writeStringList

        void writeStringList​(int fieldNumber,
                             java.util.List<java.lang.String> value)
                      throws java.io.IOException
        Writes a list field of type FieldType.STRING.
        Throws:
        java.io.IOException
      • writeBytesList

        void writeBytesList​(int fieldNumber,
                            java.util.List<ByteString> value)
                     throws java.io.IOException
        Writes a list field of type FieldType.BYTES.
        Throws:
        java.io.IOException
      • writeUInt32List

        void writeUInt32List​(int fieldNumber,
                             java.util.List<java.lang.Integer> value,
                             boolean packed)
                      throws java.io.IOException
        Writes a list field of type FieldType.UINT32.
        Throws:
        java.io.IOException
      • writeSFixed32List

        void writeSFixed32List​(int fieldNumber,
                               java.util.List<java.lang.Integer> value,
                               boolean packed)
                        throws java.io.IOException
        Writes a list field of type FieldType.SFIXED32.
        Throws:
        java.io.IOException
      • writeSFixed64List

        void writeSFixed64List​(int fieldNumber,
                               java.util.List<java.lang.Long> value,
                               boolean packed)
                        throws java.io.IOException
        Writes a list field of type FieldType.SFIXED64.
        Throws:
        java.io.IOException
      • writeSInt32List

        void writeSInt32List​(int fieldNumber,
                             java.util.List<java.lang.Integer> value,
                             boolean packed)
                      throws java.io.IOException
        Writes a list field of type FieldType.SINT32.
        Throws:
        java.io.IOException
      • writeSInt64List

        void writeSInt64List​(int fieldNumber,
                             java.util.List<java.lang.Long> value,
                             boolean packed)
                      throws java.io.IOException
        Writes a list field of type FieldType.SINT64.
        Throws:
        java.io.IOException
      • writeMessageList

        void writeMessageList​(int fieldNumber,
                              java.util.List<?> value)
                       throws java.io.IOException
        Writes a list field of type FieldType.MESSAGE.
        Throws:
        java.io.IOException
      • writeMessageList

        void writeMessageList​(int fieldNumber,
                              java.util.List<?> value,
                              Schema schema)
                       throws java.io.IOException
        Writes a list field of type FieldType.MESSAGE.
        Throws:
        java.io.IOException
      • writeGroupList

        @Deprecated
        void writeGroupList​(int fieldNumber,
                            java.util.List<?> value)
                     throws java.io.IOException
        Deprecated.
        groups fields are deprecated.
        Writes a list field of type FieldType.GROUP.
        Throws:
        java.io.IOException
      • writeGroupList

        @Deprecated
        void writeGroupList​(int fieldNumber,
                            java.util.List<?> value,
                            Schema schema)
                     throws java.io.IOException
        Deprecated.
        groups fields are deprecated.
        Writes a list field of type FieldType.GROUP.
        Throws:
        java.io.IOException
      • writeMessageSetItem

        void writeMessageSetItem​(int fieldNumber,
                                 java.lang.Object value)
                          throws java.io.IOException
        Writes a message field in MessageSet wire-format.
        Parameters:
        value - A message instance or an opaque ByteString for an unknown field.
        Throws:
        java.io.IOException
      • writeMap

        <K,​V> void writeMap​(int fieldNumber,
                                  MapEntryLite.Metadata<K,​V> metadata,
                                  java.util.Map<K,​V> map)
                           throws java.io.IOException
        Writes a map field.
        Throws:
        java.io.IOException