public interface ObjectEncoder
Modifier and Type | Method and Description |
---|---|
void |
writeBooleanContents(boolean v)
Writes the value in-line.
|
void |
writeBooleanField(String fieldName,
boolean v)
Writes a boolean.
|
void |
writeByteArrayContents(byte[] v)
Special case for byte [] that uses base64 encoding for XML
|
void |
writeByteContents(byte v)
Writes the value in-line.
|
void |
writeClassContents(Class<?> v)
Writes the value in-line.
|
void |
writeClassField(String fieldName,
Class<?> v)
Writes a Class.
|
void |
writeDoubleContents(double v)
Writes the value in-line.
|
void |
writeDoubleField(String fieldName,
double v)
Writes a double.
|
void |
writeFloatContents(float v)
Writes the value in-line.
|
void |
writeFloatField(String fieldName,
float v)
Writes a float.
|
void |
writeIntContents(int v)
Writes the value in-line.
|
void |
writeIntField(String fieldName,
int v)
Writes an int.
|
void |
writeLongContents(long v)
Writes the value in-line.
|
void |
writeLongField(String fieldName,
long v)
Writes a long.
|
void |
writeObjectContents(Object o)
Writes a sub-object
|
void |
writeObjectField(String fieldName,
Object object,
boolean inline)
Writes an object using the appropriate serializer for that object
|
void |
writeStringContents(String str)
Writes the value in-line.
|
void |
writeStringField(String fieldName,
String v)
Writes a String.
|
void writeObjectField(String fieldName, Object object, boolean inline)
fieldName
- A hint of the field name. Ignored for binary
serialization. Becomes the subelement name for xml serializationobject
- The object to serializeinline
- Ignore for binary serialization. For xml serialization,
this causes us not to have a sub-element. When inlining, polymorphic typing
is not supported.void writeBooleanField(String fieldName, boolean v)
fieldName
- A hint of the field name. Ignored for binary
serialization. Becomes the attribute name for xml serializationv
- The value to serializevoid writeIntField(String fieldName, int v)
fieldName
- A hint of the field name. Ignored for binary
serialization. Becomes the attribute name for xml serializationv
- The value to serializevoid writeLongField(String fieldName, long v)
fieldName
- A hint of the field name. Ignored for binary
serialization. Becomes the attribute name for xml serializationv
- The value to serializevoid writeFloatField(String fieldName, float v)
fieldName
- A hint of the field name. Ignored for binary
serialization. Becomes the attribute name for xml serializationv
- The value to serializevoid writeDoubleField(String fieldName, double v)
fieldName
- A hint of the field name. Ignored for binary
serialization. Becomes the attribute name for xml serializationv
- The value to serializevoid writeClassField(String fieldName, Class<?> v)
fieldName
- A hint of the field name. Ignored for binary
serialization. Becomes the attribute name for xml serializationv
- The value to serializevoid writeStringField(String fieldName, String v)
fieldName
- A hint of the field name. Ignored for binary
serialization. Becomes the attribute name for xml serializationv
- The value to serializevoid writeStringContents(String str)
void writeBooleanContents(boolean v)
void writeIntContents(int v)
void writeLongContents(long v)
void writeFloatContents(float v)
void writeDoubleContents(double v)
void writeByteContents(byte v)
void writeByteArrayContents(byte[] v)
void writeClassContents(Class<?> v)
void writeObjectContents(Object o)
o
- The object to writeCopyright © 2022. All rights reserved.