public class DataInputDecodingContext extends AbstractDecodingContext
| Modifier and Type | Field and Description | 
|---|---|
| protected java.util.List<java.lang.String> | classnamepoolThe class name pool. | 
| protected java.io.DataInput | diThe stream being decoded. | 
| protected int | offsetCurrent offset marker | 
| protected java.util.List<java.lang.String> | pkgpoolThe package fragment pool. | 
| protected java.util.List<java.lang.String> | stringpoolThe String pool. | 
classloader, currentclassname, decoderhandlers, errorreporter, knownobjects, lastobject, postprocessors, usercontext| Constructor and Description | 
|---|
| DataInputDecodingContext(java.io.DataInput di,
                        java.util.List<IDecoderHandler> decoderhandlers,
                        java.util.List<IDecoderHandler> postprocessors,
                        java.lang.Object usercontext,
                        java.lang.ClassLoader classloader,
                        IErrorReporter errorreporter)Creates a new DecodingContext. | 
| DataInputDecodingContext(java.io.DataInput di,
                        java.util.List<IDecoderHandler> decoderhandlers,
                        java.util.List<IDecoderHandler> postprocessors,
                        java.lang.Object usercontext,
                        java.lang.ClassLoader classloader,
                        IErrorReporter errorreporter,
                        int offset)Creates a new DecodingContext with specific offset. | 
| Modifier and Type | Method and Description | 
|---|---|
| int | getCurrentOffset()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(int count)Reads a number of bytes from the buffer. | 
| boolean | readBoolean()Reads a boolean value from the buffer. | 
| byte | readByte()Reads a byte from the buffer. | 
| java.lang.String | readClassname()Helper method for decoding a class name. | 
| long | readSignedVarInt()Helper method for decoding a signed variable-sized integer (VarInt). | 
| java.lang.String | readString()Helper method for decoding a string. | 
| long | readVarInt()Helper method for decoding a variable-sized integer (VarInt). | 
getClassloader, getCurrentClassName, getDecoderHandlers, getErrorReporter, getKnownObjects, getLastObject, getPostProcessors, getUserContext, setCurrentClassName, setLastObjectprotected java.io.DataInput di
protected java.util.List<java.lang.String> stringpool
protected java.util.List<java.lang.String> classnamepool
protected java.util.List<java.lang.String> pkgpool
protected int offset
public DataInputDecodingContext(java.io.DataInput di,
                                java.util.List<IDecoderHandler> decoderhandlers,
                                java.util.List<IDecoderHandler> postprocessors,
                                java.lang.Object usercontext,
                                java.lang.ClassLoader classloader,
                                IErrorReporter errorreporter)
classloader - The classloader.content - The content being decoded.public DataInputDecodingContext(java.io.DataInput di,
                                java.util.List<IDecoderHandler> decoderhandlers,
                                java.util.List<IDecoderHandler> postprocessors,
                                java.lang.Object usercontext,
                                java.lang.ClassLoader classloader,
                                IErrorReporter errorreporter,
                                int offset)
content - The content being decoded.offset - The offset.public byte readByte()
public byte[] read(int count)
count - Number of bytes.public byte[] read(byte[] array)
array - The byte array.public boolean readBoolean()
public java.lang.String readClassname()
public java.lang.String readString()
public long readVarInt()
public long readSignedVarInt()
public int getCurrentOffset()