Package jadex.binary
Class EncodingContext
java.lang.Object
jadex.binary.AbstractEncodingContext
jadex.binary.EncodingContext
- All Implemented Interfaces:
IEncodingContext
,jadex.common.transformation.traverser.IRootObjectContext
,jadex.common.transformation.traverser.IUserContextContainer
Context for encoding (serializing) an object in a binary format.
-
Field Summary
FieldsFields inherited from class jadex.binary.AbstractEncodingContext
classidcache, classloader, classnamepool, ignorewriteclass, knownobjects, lastinputobject, nonanonclasscache, preprocessors, rootobject, stringpool, usercontext, writtenbytes
-
Constructor Summary
ConstructorsConstructorDescriptionEncodingContext
(OutputStream os, Object rootobject, Object usercontext, List<jadex.common.transformation.traverser.ITraverseProcessor> preprocessors, ClassLoader classloader, SerializationConfig config) Creates an encoding context. -
Method Summary
Methods inherited from class jadex.binary.AbstractEncodingContext
createObjectId, getClassLoader, getNonInnerClassCache, getObjectId, getPreprocessors, getRootObject, getUserContext, getWrittenBytes, isIgnoreNextClassWrite, pooledWrite, setIgnoreNextClassWrite, setInputObject, startObjectFrame, startObjectFrame, stopObjectFrame, writeBoolean, writeClass, writeClassname, writeSignedVarInt, writeString, writeVarInt
-
Field Details
-
classnamecache
Cache for class names. -
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.
-