public final class JsonCContent
extends com.google.api.client.http.json.JsonHttpContent
"data" envelope.
Warning: this should only be used by some older Google APIs that wrapped the response in a
"data" envelope. All newer Google APIs don't use this envelope, and for those APIs
JsonHttpContent should be used instead.
Sample usage:
static void setContent(HttpRequest request, Object data) {
JsonCContent content = new JsonCContent(new JacksonFactory(), data);
request.setContent(content);
}
Implementation is not thread-safe.
| Constructor and Description |
|---|
JsonCContent(com.google.api.client.json.JsonFactory jsonFactory,
Object data) |
| Modifier and Type | Method and Description |
|---|---|
JsonCContent |
setMediaType(com.google.api.client.http.HttpMediaType mediaType) |
void |
writeTo(OutputStream out) |
getData, getJsonFactorypublic JsonCContent(com.google.api.client.json.JsonFactory jsonFactory,
Object data)
jsonFactory - JSON factory to usedata - JSON key name/value datapublic void writeTo(OutputStream out) throws IOException
writeTo in interface com.google.api.client.http.HttpContentwriteTo in class com.google.api.client.http.json.JsonHttpContentIOExceptionpublic JsonCContent setMediaType(com.google.api.client.http.HttpMediaType mediaType)
setMediaType in class com.google.api.client.http.json.JsonHttpContentCopyright © 2010-2013 Google. All Rights Reserved.