Class Marshaler

    • Constructor Summary

      Constructors 
      Constructor Description
      Marshaler()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract int getBinarySerializedSize()
      Returns the number of bytes this Marshaler will write in proto binary format.
      void writeBinaryTo​(java.io.OutputStream output)
      Marshals into the OutputStream in proto binary format.
      void writeJsonTo​(com.fasterxml.jackson.core.JsonGenerator output)
      Marshals into the JsonGenerator in proto JSON format.
      void writeJsonTo​(java.io.OutputStream output)
      Marshals into the OutputStream in proto JSON format.
      void writeJsonWithNewline​(com.fasterxml.jackson.core.JsonGenerator output)
      Marshals into the JsonGenerator in proto JSON format and adds a newline.
      protected abstract void writeTo​(Serializer output)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Marshaler

        public Marshaler()
    • Method Detail

      • writeBinaryTo

        public final void writeBinaryTo​(java.io.OutputStream output)
                                 throws java.io.IOException
        Marshals into the OutputStream in proto binary format.
        Throws:
        java.io.IOException
      • writeJsonTo

        public final void writeJsonTo​(java.io.OutputStream output)
                               throws java.io.IOException
        Marshals into the OutputStream in proto JSON format.
        Throws:
        java.io.IOException
      • writeJsonTo

        public final void writeJsonTo​(com.fasterxml.jackson.core.JsonGenerator output)
                               throws java.io.IOException
        Marshals into the JsonGenerator in proto JSON format.
        Throws:
        java.io.IOException
      • writeJsonWithNewline

        public final void writeJsonWithNewline​(com.fasterxml.jackson.core.JsonGenerator output)
                                        throws java.io.IOException
        Marshals into the JsonGenerator in proto JSON format and adds a newline.
        Throws:
        java.io.IOException
      • getBinarySerializedSize

        public abstract int getBinarySerializedSize()
        Returns the number of bytes this Marshaler will write in proto binary format.
      • writeTo

        protected abstract void writeTo​(Serializer output)
                                 throws java.io.IOException
        Throws:
        java.io.IOException