Interface ProtoStreamWriter

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      <T> FieldSetWriter<T> createFieldSetWriter​(Writable<T> writer, int startIndex)  
      default void writeAny​(int index, Object value)
      Writes the specified object of an abitrary type using the specified index.
      void writeAnyNoTag​(Object value)
      Writes the specified object of an arbitrary type.
      default <E extends Enum<E>>
      void
      writeEnum​(int index, E value)
      Writes the specified enum field using the specified index.
      void writeFixed32​(int index, int value)
      Deprecated.
      Use TagWriter.writeSFixed32(int, int) instead.
      void writeFixed64​(int index, long value)
      Deprecated.
      Use #writeSFixed64(int, int) instead.
      void writeInt32​(int index, int value)
      Deprecated.
      Use TagWriter.writeUInt32(int, int) or TagWriter.writeSInt32(int, int)
      void writeInt64​(int index, long value)
      Deprecated.
      Use #writeUInt64(int, int) or #writeSInt64(int, int)
      default void writeObject​(int index, Object value)
      Writes the specified object of a specific type using the specified index.
      void writeObjectNoTag​(Object value)
      Writes the specified object of a specific type.
      default void writeTag​(int index, int wireType)
      Deprecated.
      Use TagWriter.writeTag(int, WireType) instead.
      • Methods inherited from interface org.infinispan.protostream.RawProtoStreamWriter

        writeRawByte, writeRawBytes, writeUInt32NoTag, writeUInt64NoTag
      • Methods inherited from interface org.infinispan.protostream.TagWriter

        flush, writeBool, writeBytes, writeBytes, writeBytes, writeDouble, writeEnum, writeFloat, writeRawBytes, writeSFixed32, writeSFixed64, writeSInt32, writeSInt64, writeString, writeTag, writeUInt32, writeUInt64, writeVarint32, writeVarint64
    • Method Detail

      • writeAny

        default void writeAny​(int index,
                              Object value)
                       throws IOException
        Writes the specified object of an abitrary type using the specified index. Object will be read via ProtoStreamReader.readAny().
        Parameters:
        index - a field index
        value - a value to be written
        Throws:
        IOException - if no marshaller is associated with the type of the specified object, or if the marshaller fails to write the specified object
      • writeObject

        default void writeObject​(int index,
                                 Object value)
                          throws IOException
        Writes the specified object of a specific type using the specified index. Object will be read via ProtoStreamReader.readObject(Class).
        Parameters:
        index - a field index
        value - a value to be written
        Throws:
        IOException - if no marshaller is associated with the type of the specified object, or if the marshaller fails to write the specified object
      • writeAnyNoTag

        void writeAnyNoTag​(Object value)
                    throws IOException
        Writes the specified object of an arbitrary type. Must be preceded by {TagWriter.writeTag(int, org.infinispan.protostream.descriptors.WireType).
        Parameters:
        value - a value to be written
        Throws:
        IOException - if no marshaller is associated with the type of the specified object, or if the marshaller fails to write the specified object
      • writeObjectNoTag

        void writeObjectNoTag​(Object value)
                       throws IOException
        Writes the specified object of a specific type. Must be preceded by {TagWriter.writeTag(int, org.infinispan.protostream.descriptors.WireType).
        Parameters:
        value - a value to be written
        Throws:
        IOException - if no marshaller is associated with the type of the specified object, or if the marshaller fails to write the specified object
      • writeEnum

        default <E extends Enum<E>> void writeEnum​(int index,
                                                   E value)
                                            throws IOException
        Writes the specified enum field using the specified index. Object will be read via ProtoStreamReader.readEnum(Class).
        Parameters:
        index - a field index
        value - an enum to be written
        Throws:
        IOException - if no marshaller is associated with the type of the specified object, or if the marshaller fails to write the specified object
      • writeTag

        @Deprecated
        default void writeTag​(int index,
                              int wireType)
                       throws IOException
        Deprecated.
        Use TagWriter.writeTag(int, WireType) instead.
        Deprecated to discourage use.
        Specified by:
        writeTag in interface org.infinispan.protostream.RawProtoStreamWriter
        Specified by:
        writeTag in interface org.infinispan.protostream.TagWriter
        Throws:
        IOException
      • writeInt32

        @Deprecated
        void writeInt32​(int index,
                        int value)
                 throws IOException
        Deprecated.
        Use TagWriter.writeUInt32(int, int) or TagWriter.writeSInt32(int, int)
        Deprecated to discourage use.
        Specified by:
        writeInt32 in interface org.infinispan.protostream.RawProtoStreamWriter
        Specified by:
        writeInt32 in interface org.infinispan.protostream.TagWriter
        Throws:
        IOException
      • writeInt64

        @Deprecated
        void writeInt64​(int index,
                        long value)
                 throws IOException
        Deprecated.
        Use #writeUInt64(int, int) or #writeSInt64(int, int)
        Deprecated to discourage use.
        Specified by:
        writeInt64 in interface org.infinispan.protostream.RawProtoStreamWriter
        Specified by:
        writeInt64 in interface org.infinispan.protostream.TagWriter
        Throws:
        IOException
      • writeFixed32

        @Deprecated
        void writeFixed32​(int index,
                          int value)
                   throws IOException
        Deprecated.
        Use TagWriter.writeSFixed32(int, int) instead.
        Deprecated to discourage use.
        Specified by:
        writeFixed32 in interface org.infinispan.protostream.RawProtoStreamWriter
        Specified by:
        writeFixed32 in interface org.infinispan.protostream.TagWriter
        Throws:
        IOException
      • writeFixed64

        @Deprecated
        void writeFixed64​(int index,
                          long value)
                   throws IOException
        Deprecated.
        Use #writeSFixed64(int, int) instead.
        Deprecated to discourage use.
        Specified by:
        writeFixed64 in interface org.infinispan.protostream.RawProtoStreamWriter
        Specified by:
        writeFixed64 in interface org.infinispan.protostream.TagWriter
        Throws:
        IOException