org.apache.commons.httpclient.methods.multipart
Class StringPart
Simple string parameter for a multipart post
BOUNDARY, BOUNDARY_BYTES, CHARSET, CHARSET_BYTES, CONTENT_DISPOSITION, CONTENT_DISPOSITION_BYTES, CONTENT_TRANSFER_ENCODING, CONTENT_TRANSFER_ENCODING_BYTES, CONTENT_TYPE, CONTENT_TYPE_BYTES, CRLF, CRLF_BYTES, EXTRA, EXTRA_BYTES, QUOTE, QUOTE_BYTES |
StringPart(String name, String value)- Constructor.
|
StringPart(String name, String value, String charset)- Constructor.
|
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)- Sets the character encoding.
|
getBoundary, getCharSet, getContentType, getLengthOfParts, getLengthOfParts, getName, getPartBoundary, getTransferEncoding, isRepeatable, length, lengthOfData, send, sendContentTypeHeader, sendData, sendDispositionHeader, sendEnd, sendEndOfHeader, sendParts, sendParts, sendStart, sendTransferEncodingHeader, toString |
DEFAULT_CHARSET
public static final String DEFAULT_CHARSET
Default charset of string parameters
DEFAULT_CONTENT_TYPE
public static final String DEFAULT_CONTENT_TYPE
Default content encoding of string parameters.
DEFAULT_TRANSFER_ENCODING
public static final String DEFAULT_TRANSFER_ENCODING
Default transfer encoding of string parameters
StringPart
public StringPart(String name,
String value) Constructor.
name - The name of the partvalue - the string to post
StringPart
public StringPart(String name,
String value,
String charset) Constructor.
name - The name of the partvalue - the string to postcharset - the charset to be used to encode the string, if null
the default is used
lengthOfData
protected long lengthOfData()
throws IOException Return the length of the data.
- lengthOfData in interface Part
sendData
protected void sendData(OutputStream out)
throws IOException Writes the data to the given OutputStream.
- sendData in interface Part
out - the OutputStream to write to
setCharSet
public void setCharSet(String charSet)
Sets the character encoding.
- setCharSet in interface PartBase
charSet - the character encoding, or null to exclude the character
encoding header
Copyright (c) 1999-2005 - Apache Software Foundation