public class DataOutputEncodingContext extends AbstractEncodingContext
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.Class<?>,java.lang.Integer> |
classidcache
Cache for class IDs.
|
protected java.util.Map<java.lang.Class<?>,java.lang.String> |
classnamecache
Cache for class names.
|
protected java.util.Map<java.lang.String,java.lang.Integer> |
classnamepool
The class name pool.
|
protected java.io.DataOutput |
dato
The binary output
|
protected java.util.Map<java.lang.String,java.lang.Integer> |
pkgpool
The package fragment pool.
|
protected java.util.Map<java.lang.String,java.lang.Integer> |
stringpool
The string pool.
|
classloader, ignorewriteclass, nonanonclasscache, preprocessors, rootobject, usercontext, writtenbytes| Constructor and Description |
|---|
DataOutputEncodingContext(java.io.DataOutput dato,
java.lang.Object rootobject,
java.lang.Object usercontext,
java.util.List<ITraverseProcessor> preprocessors,
java.lang.ClassLoader classloader)
Creates an encoding context.
|
| Modifier and Type | Method and Description |
|---|---|
void |
write(byte[] b)
Writes a byte array, appending it to the buffer.
|
void |
writeBoolean(boolean bool)
Writes a boolean value.
|
void |
writeByte(byte b)
Writes a byte.
|
void |
writeClass(java.lang.Class<?> clazz)
Writes a class to the context.
|
int |
writeClassname(java.lang.String name)
Writes the name of a class.
|
void |
writeSignedVarInt(long value)
Writes a signed variable integer to the encoding context.
|
void |
writeString(java.lang.String string)
Writes a string to the context.
|
void |
writeVarInt(long value)
Writes a variable integer to the encoding context.
|
getClassLoader, getNonInnerClassCache, getPreprocessors, getRootObject, getUserContext, getWrittenBytes, isIgnoreNextClassWrite, setIgnoreNextClassWriteprotected java.util.Map<java.lang.Class<?>,java.lang.String> classnamecache
protected java.io.DataOutput dato
protected java.util.Map<java.lang.String,java.lang.Integer> stringpool
protected java.util.Map<java.lang.Class<?>,java.lang.Integer> classidcache
protected java.util.Map<java.lang.String,java.lang.Integer> classnamepool
protected java.util.Map<java.lang.String,java.lang.Integer> pkgpool
public DataOutputEncodingContext(java.io.DataOutput dato,
java.lang.Object rootobject,
java.lang.Object usercontext,
java.util.List<ITraverseProcessor> preprocessors,
java.lang.ClassLoader classloader)
usercontext - A user context.preprocessors - The preprocessors.classloader - The classloader.public void writeByte(byte b)
b - The byte.public void write(byte[] b)
b - The byte array.public void writeBoolean(boolean bool)
IEncodingContextbool - public void writeClass(java.lang.Class<?> clazz)
IEncodingContextclazz - public int writeClassname(java.lang.String name)
IEncodingContextname - The name of the class.public void writeString(java.lang.String string)
IEncodingContextstring - public void writeVarInt(long value)
IEncodingContextvalue - public void writeSignedVarInt(long value)
IEncodingContextvalue -