Package jadex.binary
Interface IDecodingContext
- 
- All Superinterfaces:
- IUserContextContainer
 - All Known Implementing Classes:
- AbstractDecodingContext,- DataInputDecodingContext,- FramingStreamDecodingContext,- StreamDecodingContext
 
 public interface IDecodingContext extends IUserContextContainer Decoding context interface.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description longcreateObjectId(java.lang.Object object)Creates ID for an object.java.lang.ClassLoadergetClassloader()Gets the classloader.java.lang.StringgetCurrentClassName()Gets the current class name.intgetCurrentOffset()Returns the current offset of the decoding process for debugging.java.util.List<IDecoderHandler>getDecoderHandlers()Returns the handlers used to decode objects.IErrorReportergetErrorReporter()Gets the error reporter.java.lang.ObjectgetLastObject()Returns the last object decoded.java.lang.ObjectgetObjectForId(long id)Gets a known object by ID.java.lang.LonggetObjectId(java.lang.Object object)Gets the ID of a known object.java.util.List<ITraverseProcessor>getPostProcessors()Returns the handlers used for post-processing.byte[]read(byte[] array)Reads a number of bytes from the buffer and fills the array.booleanreadBoolean()Reads a boolean value from the buffer.bytereadByte()Reads a byte from the buffer.java.lang.StringreadClassname()Helper method for decoding a class name.longreadSignedVarInt()Helper method for decoding a signed variable-sized integer (VarInt).java.lang.StringreadString()Helper method for decoding a string.longreadVarInt()Helper method for decoding a variable-sized integer (VarInt).voidsetLastObject(java.lang.Object lastobject)Sets the last object decoded.voidsetObjectForId(long id, java.lang.Object object)Sets a known object by ID.voidsetVersion(int version)Sets the format version.voidstartObjectFrame(boolean fixedsize)Starts an object frame when using a context with framing support.voidstopObjectFrame()Stops an object frame when using a context with framing support.- 
Methods inherited from interface jadex.commons.transformation.traverser.IUserContextContainergetUserContext
 
- 
 
- 
- 
- 
Method Detail- 
getCurrentClassNamejava.lang.String getCurrentClassName() Gets the current class name.- Returns:
- The current class name.
 
 - 
getLastObjectjava.lang.Object getLastObject() Returns the last object decoded.- Returns:
- The last object decoded.
 
 - 
setLastObjectvoid setLastObject(java.lang.Object lastobject) Sets the last object decoded.- Parameters:
- lastobject- The last object decoded.
 
 - 
setVersionvoid setVersion(int version) Sets the format version.- Parameters:
- version- The version.
 
 - 
createObjectIdlong createObjectId(java.lang.Object object) Creates ID for an object.- Parameters:
- object- The object
- Returns:
- The ID.
 
 - 
getObjectForIdjava.lang.Object getObjectForId(long id) Gets a known object by ID.- Parameters:
- id- The ID.
- Returns:
- The object or null.
 
 - 
setObjectForIdvoid setObjectForId(long id, java.lang.Object object)Sets a known object by ID.- Parameters:
- id- The ID.
- object- The object..
 
 - 
getObjectIdjava.lang.Long getObjectId(java.lang.Object object) Gets the ID of a known object.- Parameters:
- object- The object
- Returns:
- The ID.
 
 - 
getClassloaderjava.lang.ClassLoader getClassloader() Gets the classloader.- Returns:
- The classloader.
 
 - 
getDecoderHandlersjava.util.List<IDecoderHandler> getDecoderHandlers() Returns the handlers used to decode objects.- Returns:
- The handlers.
 
 - 
getErrorReporterIErrorReporter getErrorReporter() Gets the error reporter.- Returns:
- The error reporter.
 
 - 
getPostProcessorsjava.util.List<ITraverseProcessor> getPostProcessors() Returns the handlers used for post-processing.- Returns:
- Post-processing handlers.
 
 - 
readBytebyte readByte() Reads a byte from the buffer.- Returns:
- A byte.
 
 - 
readbyte[] read(byte[] array) Reads a number of bytes from the buffer and fills the array.- Parameters:
- array- The byte array.
- Returns:
- The byte array for convenience.
 
 - 
readBooleanboolean readBoolean() Reads a boolean value from the buffer.- Returns:
- Boolean value.
 
 - 
readStringjava.lang.String readString() Helper method for decoding a string.- Returns:
- String encoded at the current position.
 
 - 
readVarIntlong readVarInt() Helper method for decoding a variable-sized integer (VarInt).- Returns:
- The decoded value.
 
 - 
readSignedVarIntlong readSignedVarInt() Helper method for decoding a signed variable-sized integer (VarInt).- Returns:
- The decoded value.
 
 - 
readClassnamejava.lang.String readClassname() Helper method for decoding a class name.- Returns:
- String encoded at the current position.
 
 - 
getCurrentOffsetint getCurrentOffset() Returns the current offset of the decoding process for debugging.- Returns:
- Current offset.
 
 - 
startObjectFramevoid 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).
 
 - 
stopObjectFramevoid stopObjectFrame() Stops an object frame when using a context with framing support.
 
- 
 
-