Package jadex.binary
Class EncodingContext
- java.lang.Object
-
- jadex.binary.AbstractEncodingContext
-
- jadex.binary.EncodingContext
-
- All Implemented Interfaces:
IEncodingContext
,IRootObjectContext
,IUserContextContainer
public class EncodingContext extends AbstractEncodingContext
Context for encoding (serializing) an object in a binary format.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Class<?>,java.lang.String>
classnamecache
Cache for class names.protected java.io.OutputStream
os
The binary output-
Fields inherited from class jadex.binary.AbstractEncodingContext
classidcache, classloader, classnamepool, ignorewriteclass, knownobjects, lastinputobject, nonanonclasscache, preprocessors, rootobject, stringpool, usercontext, writtenbytes
-
-
Constructor Summary
Constructors Constructor Description EncodingContext(java.io.OutputStream os, java.lang.Object rootobject, java.lang.Object usercontext, java.util.List<ITraverseProcessor> preprocessors, java.lang.ClassLoader classloader, SerializationConfig config)
Creates an encoding context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
write(byte[] b)
Writes a byte array, appending it to the buffer.void
writeByte(byte b)
Writes a byte.-
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
-
-
-
-
Constructor Detail
-
EncodingContext
public EncodingContext(java.io.OutputStream os, java.lang.Object rootobject, java.lang.Object usercontext, java.util.List<ITraverseProcessor> preprocessors, java.lang.ClassLoader classloader, SerializationConfig config)
Creates an encoding context.- Parameters:
usercontext
- A user context.preprocessors
- The preprocessors.classloader
- The classloader.
-
-