Class LongCodec

  • All Implemented Interfaces:
    Codec<java.lang.Long>

    public class LongCodec
    extends java.lang.Object
    implements Codec<java.lang.Long>
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Long decode​(java.io.InputStream in)
      Decode a serialized instance into an in-memory object of type T.
      static long decodeStatic​(java.io.InputStream in)  
      void encode​(java.io.OutputStream out, java.lang.Long val)
      Encode an in-memory object into serialized form.
      static void encodeStatic​(java.io.OutputStream out, long val)  
      java.lang.String getTypeName()
      Gets the portable name for the type used in protobuf.
      • Methods inherited from class java.lang.Object

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

      • getTypeName

        public java.lang.String getTypeName()
        Description copied from interface: Codec
        Gets the portable name for the type used in protobuf.
        Specified by:
        getTypeName in interface Codec<java.lang.Long>
        Returns:
        The name of the type.
      • decodeStatic

        public static long decodeStatic​(java.io.InputStream in)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • decode

        public java.lang.Long decode​(java.io.InputStream in)
                              throws java.io.IOException
        Description copied from interface: Codec
        Decode a serialized instance into an in-memory object of type T.
        Specified by:
        decode in interface Codec<java.lang.Long>
        Parameters:
        in - The input stream the object is to be decoded from.
        Returns:
        The decoded object.
        Throws:
        java.io.IOException
      • encodeStatic

        public static void encodeStatic​(java.io.OutputStream out,
                                        long val)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • encode

        public void encode​(java.io.OutputStream out,
                           java.lang.Long val)
                    throws java.io.IOException
        Description copied from interface: Codec
        Encode an in-memory object into serialized form.
        Specified by:
        encode in interface Codec<java.lang.Long>
        Parameters:
        out - The output stream to send the serialized object to.
        val - The in-memory object to be serialized.
        Throws:
        java.io.IOException