|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ObjectEncoder
Interface to abstract away the difference between serializing xml and binary
| Method Summary | |
|---|---|
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 |
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. |
| Method Detail |
|---|
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 serialize
void 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 serialize
void 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 serialize
void 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 serialize
void 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 serialize
void 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 serialize
void 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 writeByteArrayContents(byte[] v)
void writeClassContents(Class<?> v)
void writeObjectContents(Object o)
o - The object to write
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||