org.apache.commons.httpclient.methods
public class StringRequestEntity extends Object implements RequestEntity
Since: 3.0
Constructor Summary | |
---|---|
StringRequestEntity(String content) Creates a new entity with the given content. | |
StringRequestEntity(String content, String contentType, String charset)
Creates a new entity with the given content, content type, and charset.
|
Method Summary | |
---|---|
String | getCharset() |
String | getContent() |
long | getContentLength() |
String | getContentType() |
boolean | isRepeatable() |
void | writeRequest(OutputStream out) |
Deprecated: use StringRequestEntity instead
Creates a new entity with the given content. This constructor will use the default platform charset to convert the content string and will provide no content type.
Parameters: content The content to set.
Parameters: 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.
Returns: Returns the charset used to convert the content to bytes. null
if
no charset as been specified.
Returns: Returns the content.
Returns: The length of the content.
Returns: true