org.apache.commons.httpclient.methods.multipart
public class StringPart extends PartBase
Since: 2.0
Field Summary | |
---|---|
static String | DEFAULT_CHARSET Default charset of string parameters |
static String | DEFAULT_CONTENT_TYPE Default content encoding of string parameters. |
static String | DEFAULT_TRANSFER_ENCODING Default transfer encoding of string parameters |
Constructor Summary | |
---|---|
StringPart(String name, String value, String charset)
Constructor.
| |
StringPart(String name, String value)
Constructor.
|
Method Summary | |
---|---|
protected long | lengthOfData()
Return the length of the data. |
protected void | sendData(OutputStream out)
Writes the data to the given OutputStream. |
void | setCharSet(String charSet) |
Parameters: name The name of the part value the string to post charset the charset to be used to encode the string, if null
the default
is used
Parameters: name The name of the part value the string to post
Returns: The length of the data.
Throws: IOException If an IO problem occurs
See Also: lengthOfData
Parameters: out the OutputStream to write to
Throws: IOException if there is a write error