Package jadex.binary

Class FramingStreamDecodingContext

All Implemented Interfaces:
IDecodingContext, jadex.common.transformation.traverser.IUserContextContainer

public class FramingStreamDecodingContext extends StreamDecodingContext
Stream decoding context that can handled framed streams.
  • Field Details

    • framestack

      protected Deque<jadex.common.Tuple2<Integer,Integer>> framestack
      The frame stack, frame start position, frame length.
  • Constructor Details

    • FramingStreamDecodingContext

      public FramingStreamDecodingContext(InputStream is, List<IDecoderHandler> decoderhandlers, List<jadex.common.transformation.traverser.ITraverseProcessor> postprocessors, Object usercontext, ClassLoader classloader, jadex.common.transformation.traverser.IErrorReporter errorreporter, SerializationConfig config)
      Creates a new DecodingContext.
      Parameters:
      classloader - The classloader.
      content - The content being decoded.
    • FramingStreamDecodingContext

      public FramingStreamDecodingContext(InputStream is, List<IDecoderHandler> decoderhandlers, List<jadex.common.transformation.traverser.ITraverseProcessor> postprocessors, Object usercontext, ClassLoader classloader, jadex.common.transformation.traverser.IErrorReporter errorreporter, SerializationConfig config, int offset)
      Creates a new DecodingContext with specific offset.
      Parameters:
      offset - The offset.
      content - The content being decoded.
  • Method Details

    • startObjectFrame

      public void startObjectFrame(boolean fixedsize)
      Starts an object frame when using a context with framing support.
      Specified by:
      startObjectFrame in interface IDecodingContext
      Overrides:
      startObjectFrame in class AbstractDecodingContext
      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

      public void stopObjectFrame()
      Stops an object frame when using a context with framing support.
      Specified by:
      stopObjectFrame in interface IDecodingContext
      Overrides:
      stopObjectFrame in class AbstractDecodingContext