public class EncodingContext2 extends AbstractEncodingContext
Constructor and Description |
---|
EncodingContext2(OutputStream os,
Object rootobject,
Object usercontext,
List<ITraverseProcessor> preprocessors,
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(Class<?> clazz)
Writes a class to the context.
|
int |
writeClassname(String name)
Writes the name of a class.
|
void |
writeSignedVarInt(long value)
Writes a signed variable integer to the encoding context.
|
void |
writeString(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, setIgnoreNextClassWrite
public EncodingContext2(OutputStream os, Object rootobject, Object usercontext, List<ITraverseProcessor> preprocessors, 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)
IEncodingContext
bool
- public void writeClass(Class<?> clazz)
IEncodingContext
clazz
- public int writeClassname(String name)
IEncodingContext
name
- The name of the class.public void writeString(String string)
IEncodingContext
string
- public void writeVarInt(long value)
IEncodingContext
value
- public void writeSignedVarInt(long value)
IEncodingContext
value
- Copyright © 2015. All Rights Reserved.