|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.http.UrlEncodedContent
public final class UrlEncodedContent
Implements support for HTTP form content encoding serialization of type
application/x-www-form-urlencoded as specified in the HTML 4.0
Specification.
Sample usage:
static void setContent(HttpRequest request, Object item) {
UrlEncodedContent content = new UrlEncodedContent();
content.setData(item);
request.content = content;
}
| Field Summary | |
|---|---|
String |
contentType
Content type. |
Object |
data
Key/value data or null for none. |
| Constructor Summary | |
|---|---|
UrlEncodedContent()
|
|
| Method Summary | |
|---|---|
String |
getEncoding()
Returns the content encoding (for example "gzip") or null
for none. |
long |
getLength()
Returns the content length or less than zero if not known. |
String |
getType()
Returns the content type. |
void |
setData(Object data)
Deprecated. (scheduled to be removed in version 1.1) Use data |
void |
writeTo(OutputStream out)
Writes the content to the given output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public String contentType
UrlEncodedParser.CONTENT_TYPE.
public Object data
null for none.
| Constructor Detail |
|---|
public UrlEncodedContent()
| Method Detail |
|---|
@Deprecated public void setData(Object data)
data
data - key/value data (may be null)public String getEncoding()
HttpContent"gzip") or null
for none.
getEncoding in interface HttpContent
public long getLength()
throws UnsupportedEncodingException
HttpContent
getLength in interface HttpContentUnsupportedEncodingExceptionpublic String getType()
HttpContent
getType in interface HttpContent
public void writeTo(OutputStream out)
throws IOException
HttpContent
writeTo in interface HttpContentIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||