Package jadex.binary

Class EncodingContext

All Implemented Interfaces:
IEncodingContext, jadex.common.transformation.traverser.IRootObjectContext, jadex.common.transformation.traverser.IUserContextContainer

public class EncodingContext extends AbstractEncodingContext
Context for encoding (serializing) an object in a binary format.
  • Field Details

    • classnamecache

      protected Map<Class<?>,String> classnamecache
      Cache for class names.
    • os

      protected OutputStream os
      The binary output
  • Constructor Details

    • EncodingContext

      public EncodingContext(OutputStream os, Object rootobject, Object usercontext, List<jadex.common.transformation.traverser.ITraverseProcessor> preprocessors, ClassLoader classloader, SerializationConfig config)
      Creates an encoding context.
      Parameters:
      usercontext - A user context.
      preprocessors - The preprocessors.
      classloader - The classloader.
  • Method Details

    • writeByte

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

      public void write(byte[] b)
      Writes a byte array, appending it to the buffer.
      Parameters:
      b - The byte array.