Package jadex.binary
Class DataInputDecodingContext
- java.lang.Object
- 
- jadex.binary.AbstractDecodingContext
- 
- jadex.binary.DataInputDecodingContext
 
 
- 
- All Implemented Interfaces:
- IDecodingContext,- IUserContextContainer
 
 public class DataInputDecodingContext extends AbstractDecodingContext Context for decoding a binary-encoded object.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class jadex.binary.AbstractDecodingContextAbstractDecodingContext.IVersionedHandler, AbstractDecodingContext.VersionedHandler2, AbstractDecodingContext.VersionedHandler3, AbstractDecodingContext.VersionedHandler4
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected java.io.DataInputdiThe stream being decoded.protected intoffsetCurrent offset marker- 
Fields inherited from class jadex.binary.AbstractDecodingContextclassloader, classnamepool, config, currentclassname, decoderhandlers, errorreporter, knownobjects, lastobject, postprocessors, stringpool, usercontext, versionedhandler
 
- 
 - 
Constructor SummaryConstructors Constructor Description DataInputDecodingContext(java.io.DataInput di, java.util.List<IDecoderHandler> decoderhandlers, java.util.List<ITraverseProcessor> postprocessors, java.lang.Object usercontext, java.lang.ClassLoader classloader, IErrorReporter errorreporter, SerializationConfig config)Creates a new DecodingContext.DataInputDecodingContext(java.io.DataInput di, java.util.List<IDecoderHandler> decoderhandlers, java.util.List<ITraverseProcessor> postprocessors, java.lang.Object usercontext, java.lang.ClassLoader classloader, IErrorReporter errorreporter, SerializationConfig config, int offset)Creates a new DecodingContext with specific offset.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCurrentOffset()Returns the current offset of the decoding process for debugging.byte[]read(byte[] array)Reads a number of bytes from the buffer and fills the array.byte[]read(byte[] array, int woffset, int wlength)Reads a number of bytes from the buffer and fills the array.byte[]read(int count)Reads a number of bytes from the buffer.bytereadByte()Reads a byte from the buffer.- 
Methods inherited from class jadex.binary.AbstractDecodingContextcreateObjectId, getClassloader, getCurrentClassName, getDecoderHandlers, getErrorReporter, getLastObject, getObjectForId, getObjectId, getPostProcessors, getUserContext, pooledRead, readBoolean, readClassname, readSignedVarInt, readString, readVarInt, setCurrentClassName, setLastObject, setObjectForId, setVersion, startObjectFrame, startObjectFrame, stopObjectFrame
 
- 
 
- 
- 
- 
Constructor Detail- 
DataInputDecodingContextpublic DataInputDecodingContext(java.io.DataInput di, java.util.List<IDecoderHandler> decoderhandlers, java.util.List<ITraverseProcessor> postprocessors, java.lang.Object usercontext, java.lang.ClassLoader classloader, IErrorReporter errorreporter, SerializationConfig config)Creates a new DecodingContext.- Parameters:
- classloader- The classloader.
- content- The content being decoded.
 
 - 
DataInputDecodingContextpublic DataInputDecodingContext(java.io.DataInput di, java.util.List<IDecoderHandler> decoderhandlers, java.util.List<ITraverseProcessor> postprocessors, java.lang.Object usercontext, java.lang.ClassLoader classloader, IErrorReporter errorreporter, SerializationConfig config, int offset)Creates a new DecodingContext with specific offset.- Parameters:
- content- The content being decoded.
- offset- The offset.
 
 
- 
 - 
Method Detail- 
readBytepublic byte readByte() Reads a byte from the buffer.- Returns:
- A byte.
 
 - 
readpublic byte[] read(int count) Reads a number of bytes from the buffer.- Specified by:
- readin class- AbstractDecodingContext
- Parameters:
- count- Number of bytes.
- Returns:
- Byte array with the bytes.
 
 - 
readpublic byte[] read(byte[] array) Reads a number of bytes from the buffer and fills the array.- Specified by:
- readin interface- IDecodingContext
- Specified by:
- readin class- AbstractDecodingContext
- Parameters:
- array- The byte array.
- Returns:
- The byte array for convenience.
 
 - 
readpublic byte[] read(byte[] array, int woffset, int wlength)Reads a number of bytes from the buffer and fills the array.- Specified by:
- readin class- AbstractDecodingContext
- Parameters:
- array- The byte array.
- woffset- write offset.
- wlength- length to read.
- Returns:
- The byte array for convenience.
 
 - 
getCurrentOffsetpublic int getCurrentOffset() Returns the current offset of the decoding process for debugging.- Returns:
- Current offset.
 
 
- 
 
-