|
||||||||||
| 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.data = 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 or null for none. |
boolean |
retrySupported()
Returns whether or not retry is supported on this content type. |
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 |
|---|
public String getEncoding()
HttpContent"gzip") or null for none.
getEncoding in interface HttpContentpublic long getLength()
HttpContent
getLength in interface HttpContentpublic String getType()
HttpContentnull for none.
getType in interface HttpContent
public void writeTo(OutputStream out)
throws IOException
HttpContent
writeTo in interface HttpContentIOExceptionpublic boolean retrySupported()
HttpContent
retrySupported in interface HttpContent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||