@Immutable @ThreadSafe @LevelUpApi(contract=INTERNAL) public final class JsonElementRequestBody extends StringRequestBody
JsonElement
.Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<JsonElementRequestBody> |
CREATOR
Parcelable creator. |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
JsonElementRequestBody(com.google.gson.Gson gson,
com.google.gson.JsonElement jsonElement) |
JsonElementRequestBody(com.google.gson.JsonElement jsonElement) |
JsonElementRequestBody(Parcel source) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
String |
getContentType() |
equals, getContentLength, hashCode, toString, writeToOutputStream, writeToParcel
public static final Parcelable.Creator<JsonElementRequestBody> CREATOR
Parcelable
creator.public JsonElementRequestBody(com.google.gson.JsonElement jsonElement)
jsonElement
- the element to serialize to the request body.public JsonElementRequestBody(com.google.gson.Gson gson, com.google.gson.JsonElement jsonElement)
gson
- the Gson serializer.jsonElement
- the element to serialize to the request body.public JsonElementRequestBody(Parcel source)
source
- parcel to restore from.public int describeContents()
describeContents
in interface Parcelable
describeContents
in class StringRequestBody
public String getContentType()