public final class RawData extends Object implements Parcelable
sendRawData(RawData) then everyone will receive
in onRawDataAdded(RawData) later| Modifier and Type | Class and Description |
|---|---|
static class |
RawData.Builder
Builder class for building the raw data for
ChatroomManager.sendRawData(RawData) |
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>| Modifier and Type | Field and Description |
|---|---|
static Parcelable.Creator<RawData> |
CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE| Modifier | Constructor and Description |
|---|---|
protected |
RawData(Parcel in,
ClassLoader loader) |
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents() |
boolean |
equals(Object o) |
String |
getJsonText() |
<T> T |
getJsonTextAsData(Class<T> type)
Try to deserialize the
getJsonText() as the given JSON (RFC 7159)
model class. |
RawData.Builder |
newBuilder() |
void |
writeToParcel(Parcel dest,
int flags) |
public static final Parcelable.Creator<RawData> CREATOR
protected RawData(Parcel in, ClassLoader loader)
public <T> T getJsonTextAsData(Class<T> type) throws IOException, JSONException
getJsonText() as the given JSON (RFC 7159)
model class.
If our built-in JSON converter doesn't make you happy, please use getJsonText() directly.
type - Because the model variable name will be treat as
JSON key, you should keep them during release proguard.IOException - If there is any error when reading the JSON text.JSONException - If the JSON text doesn’t match the expected formatChatroomManager.sendRawData(RawData)public RawData.Builder newBuilder()
public int describeContents()
describeContents in interface Parcelablepublic void writeToParcel(Parcel dest, int flags)
writeToParcel in interface Parcelable