Package jadex.binary

Interface IEncodingContext

    • Method Detail

      • getPreprocessors

        java.util.List<ITraverseProcessor> getPreprocessors()
        Returns the preprocessors.
        Returns:
        The preprocessors
      • getClassLoader

        java.lang.ClassLoader getClassLoader()
        Gets the classloader.
        Returns:
        The classloader.
      • getNonInnerClassCache

        java.util.Set<java.lang.Class<?>> getNonInnerClassCache()
        Returns the non-inner class cache.
        Returns:
        The non-inner class cache.
      • setInputObject

        void setInputObject​(java.lang.Object object)
        Sets the object for which the next createObjectId() call creates an ID.
        Parameters:
        object - The object.
      • createObjectId

        long createObjectId()
        Creates ID for an object.
        Parameters:
        object - The object
        Returns:
        The ID.
      • getObjectId

        java.lang.Long getObjectId​(java.lang.Object object)
        Gets the ID of a known object.
        Parameters:
        object - The object
        Returns:
        The ID.
      • setIgnoreNextClassWrite

        void setIgnoreNextClassWrite​(boolean state)
        Puts the context in a state where the next call to writeClass is ignored.
        Parameters:
        state - If true, the next class write will be ignored and the state reset.
      • writeByte

        void writeByte​(byte b)
        Writes a byte.
        Parameters:
        b - The byte.
      • write

        void write​(byte[] b)
        Writes a byte array.
        Parameters:
        b - The byte array.
      • writeBoolean

        void writeBoolean​(boolean bool)
        Writes a boolean value.
        Parameters:
        bool - The value.
      • writeString

        void writeString​(java.lang.String string)
        Writes a string to the context.
        Parameters:
        string - The string.
      • writeVarInt

        void writeVarInt​(long value)
        Writes a variable integer to the encoding context.
        Parameters:
        value - The value.
      • writeSignedVarInt

        void writeSignedVarInt​(long value)
        Writes a signed variable integer to the encoding context.
        Parameters:
        value - The value.
      • writeClass

        void writeClass​(java.lang.Class<?> clazz)
        Writes a class to the context.
        Parameters:
        clazz - The class.
      • writeClassname

        int writeClassname​(java.lang.String name)
        Writes the name of a class.
        Parameters:
        name - The name of the class.
      • getWrittenBytes

        long getWrittenBytes()
        Returns the number of bytes written.
        Returns:
        The number of bytes written.
      • startObjectFrame

        void startObjectFrame()
        Starts an object frame when using a context with framing support.
      • startObjectFrame

        void startObjectFrame​(boolean fixedsize)
        Starts an object frame when using a context with framing support.
        Parameters:
        fixedsize - If true, use fixed-size (integer) framing. Set true if the object being framed is expected to be larger than 127 bytes (same type of object MUST use either fixed OR variable framing).
      • stopObjectFrame

        void stopObjectFrame()
        Stops an object frame when using a context with framing support.