public class ComplexPart
extends org.apache.commons.httpclient.methods.multipart.PartBase
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_CHARSET
Default charset of string parameters
|
static java.lang.String |
DEFAULT_CONTENT_TYPE
Default content encoding of string parameters.
|
static java.lang.String |
DEFAULT_TRANSFER_ENCODING
Default transfer encoding of string parameters
|
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| Constructor and Description |
|---|
ComplexPart(java.lang.String name,
java.lang.String value)
Constructor.
|
ComplexPart(java.lang.String name,
java.lang.String value,
java.lang.String charset)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected long |
lengthOfData()
Return the length of the data.
|
protected void |
sendData(java.io.OutputStream out)
Writes the data to the given OutputStream.
|
void |
setCharSet(java.lang.String charSet) |
getCharSet, getContentType, getName, getTransferEncoding, setContentType, setName, setTransferEncodinggetBoundary, getLengthOfParts, getLengthOfParts, getPartBoundary, isRepeatable, length, send, sendContentTypeHeader, sendDispositionHeader, sendEnd, sendEndOfHeader, sendParts, sendParts, sendStart, sendTransferEncodingHeader, toStringpublic static final java.lang.String DEFAULT_CONTENT_TYPE
public static final java.lang.String DEFAULT_CHARSET
public static final java.lang.String DEFAULT_TRANSFER_ENCODING
public ComplexPart(java.lang.String name,
java.lang.String value,
java.lang.String charset)
name - The name of the partvalue - the string to postcharset - the charset to be used to encode the string, if null
the default is usedpublic ComplexPart(java.lang.String name,
java.lang.String value)
name - The name of the partvalue - the string to postprotected void sendData(java.io.OutputStream out)
throws java.io.IOException
sendData in class org.apache.commons.httpclient.methods.multipart.Partout - the OutputStream to write tojava.io.IOException - if there is a write errorprotected long lengthOfData()
throws java.io.IOException
lengthOfData in class org.apache.commons.httpclient.methods.multipart.Partjava.io.IOException - If an IO problem occursPart.lengthOfData()public void setCharSet(java.lang.String charSet)
setCharSet in class org.apache.commons.httpclient.methods.multipart.PartBaseCopyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.