|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.httpclient.methods.StringRequestEntity
A RequestEntity that contains a String.
| Constructor Summary | |
StringRequestEntity(java.lang.String content)
Creates a new entity with the given content |
|
StringRequestEntity(java.lang.String content,
java.lang.String contentType,
java.lang.String charset)
Creates a new entity with the given content, content type, and charset. |
|
| Method Summary | |
java.lang.String |
getCharset()
|
java.lang.String |
getContent()
|
long |
getContentLength()
Gets the request entity's length. |
java.lang.String |
getContentType()
Gets the entity's content type. |
boolean |
isRepeatable()
Tests if writeRequest(OutputStream) can be called more than once. |
void |
writeRequest(java.io.OutputStream out)
Writes the request entity to the given stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StringRequestEntity(java.lang.String content)
content - The content to set.
public StringRequestEntity(java.lang.String content,
java.lang.String contentType,
java.lang.String charset)
throws java.io.UnsupportedEncodingException
content - The content to set.contentType - The type of the content, or null. The value retured
by getContentType(). If this content type contains a charset and the charset
parameter is null, the content's type charset will be used.charset - The charset of the content, or null. Used to convert the
content to bytes. If the content type does not contain a charset and charset is not null,
then the charset will be appended to the content type.| Method Detail |
public java.lang.String getContentType()
RequestEntity
getContentType in interface RequestEntityHttpMethod.setRequestHeader(String, String)public boolean isRepeatable()
RequestEntityRequestEntity.writeRequest(OutputStream) can be called more than once.
isRepeatable in interface RequestEntitytrue
public void writeRequest(java.io.OutputStream out)
throws java.io.IOException
RequestEntity
writeRequest in interface RequestEntityout -
java.io.IOExceptionpublic long getContentLength()
RequestEntity
getContentLength in interface RequestEntitypublic java.lang.String getContent()
public java.lang.String getCharset()
null if
no charset as been specified.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||