-
- All Known Implementing Classes:
AbstractDataObject,Command,InsertElement,ListUpdate,RemoveElement,SetProperty
public interface DataObjectCommon interface for allmsgbufgenerated data objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidreadContent(JsonReader in)Reads a JSON object containing keys for all fields of this object.voidwriteContent(JsonWriter out)Writes a JSON object containing keys for all fields of this object.voidwriteTo(JsonWriter out)Writes this instance to the given output.
-
-
-
Method Detail
-
writeTo
void writeTo(JsonWriter out) throws IOException
Writes this instance to the given output.- Parameters:
out- TheJsonWriterto write this instance to.- Throws:
IOException- if writing fails.
-
writeContent
void writeContent(JsonWriter out) throws IOException
Writes a JSON object containing keys for all fields of this object.In contrast to
writeTo(JsonWriter), the resulting object contains no type information. Therefore, this method must only be called directly, if the reader knows the type of the object to read from the context. For reading the data, a per-type generatedread[type-name]()method must be called.- Parameters:
out- The writer to write to.- Throws:
IOException
-
readContent
void readContent(JsonReader in) throws IOException
Reads a JSON object containing keys for all fields of this object.This method does not consider type information contained in the stream.
- Parameters:
in- The writer to write to.- Throws:
IOException
-
-