public abstract class AbstractDataObject extends Object implements DataObject
DataObject implementations.| Constructor and Description |
|---|
AbstractDataObject() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
readField(JsonReader in,
String field)
Reads the given field from the given input.
|
protected void |
readFields(JsonReader in)
Reads all fields of this instance from the given input.
|
String |
toString() |
void |
writeContent(JsonWriter out)
Writes a JSON object containing keys for all fields of this object.
|
protected void |
writeFields(JsonWriter out)
Writes all fields of this instance to the given output.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitwriteTopublic final void writeContent(JsonWriter out) throws IOException
In contrast to DataObject.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 generated read[type-name]() method must be called.
out - The writer to write to.IOExceptionprotected void writeFields(JsonWriter out) throws IOException
out - The writer to write to.IOException - If writing fails.protected final void readFields(JsonReader in) throws IOException
in - The reader to take the input from.IOExceptionprotected void readField(JsonReader in, String field) throws IOException
in - The reader to take the value from.field - The name of the field whose value should be read.IOExceptionCopyright © 2021. All rights reserved.