Class ComplexPart
java.lang.Object
org.apache.commons.httpclient.methods.multipart.Part
org.apache.commons.httpclient.methods.multipart.PartBase
org.apache.axis2.transport.http.util.ComplexPart
public class ComplexPart
extends org.apache.commons.httpclient.methods.multipart.PartBase
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault charset of string parametersstatic final StringDefault content encoding of string parameters.static final StringDefault transfer encoding of string parametersFields inherited from class org.apache.commons.httpclient.methods.multipart.Part
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, disableSendingMultipartPartCharset, EXTRA, EXTRA_BYTES, QUOTE, QUOTE_BYTES -
Constructor Summary
ConstructorsConstructorDescriptionComplexPart(String name, String value) Constructor.ComplexPart(String name, String value, boolean disableSendingMultipartPartCharset) Constructor.ComplexPart(String name, String value, boolean disableSendingMultipartPartCharset, String charset) Constructor.ComplexPart(String name, String value, boolean disableSendingMultipartPartCharset, String charset, String contentType) Constructor.ComplexPart(String name, String value, String charset) Constructor.ComplexPart(String name, String value, String charset, String contentType) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected longReturn the length of the data.protected voidsendData(OutputStream out) Writes the data to the given OutputStream.voidsetCharSet(String charSet) Methods inherited from class org.apache.commons.httpclient.methods.multipart.PartBase
getCharSet, getContentType, getName, getTransferEncoding, setContentType, setName, setTransferEncodingMethods inherited from class org.apache.commons.httpclient.methods.multipart.Part
getBoundary, getLengthOfParts, getLengthOfParts, getPartBoundary, isRepeatable, length, send, sendContentTypeHeader, sendDispositionHeader, sendEnd, sendEndOfHeader, sendParts, sendParts, sendStart, sendTransferEncodingHeader, toString
-
Field Details
-
DEFAULT_CONTENT_TYPE
Default content encoding of string parameters.- See Also:
-
DEFAULT_CHARSET
Default charset of string parameters- See Also:
-
DEFAULT_TRANSFER_ENCODING
Default transfer encoding of string parameters- See Also:
-
-
Constructor Details
-
ComplexPart
Constructor.- Parameters:
name- The name of the partvalue- the string to postcharset- the charset to be used to encode the string, ifnullthedefaultis used
-
ComplexPart
Constructor.- Parameters:
name- The name of the partvalue- the string to postcharset- the charset to be used to encode the string, ifnullthedefaultis usedcontentType- the content type of the part
-
ComplexPart
public ComplexPart(String name, String value, boolean disableSendingMultipartPartCharset, String charset, String contentType) Constructor.- Parameters:
name- The name of the partvalue- the string to postdisableSendingMultipartPartCharset- whether to send the charset in the Content-Type headercharset- the charset to be used to encode the string, ifnullthedefaultis usedcontentType- the content type of the part
-
ComplexPart
public ComplexPart(String name, String value, boolean disableSendingMultipartPartCharset, String charset) Constructor.- Parameters:
name- The name of the partvalue- the string to postdisableSendingMultipartPartCharset- whether to send the charset in the Content-Type headercharset- the charset to be used to encode the string, ifnullthedefaultis used
-
ComplexPart
Constructor.- Parameters:
name- The name of the partvalue- the string to post
-
ComplexPart
Constructor.- Parameters:
name- The name of the partvalue- the string to postdisableSendingMultipartPartCharset- whether to send the charset in the Content-Type header
-
-
Method Details
-
sendData
Writes the data to the given OutputStream.- Specified by:
sendDatain classorg.apache.commons.httpclient.methods.multipart.Part- Parameters:
out- the OutputStream to write to- Throws:
IOException- if there is a write error
-
lengthOfData
Return the length of the data.- Specified by:
lengthOfDatain classorg.apache.commons.httpclient.methods.multipart.Part- Returns:
- The length of the data.
- Throws:
IOException- If an IO problem occurs- See Also:
-
setCharSet
- Overrides:
setCharSetin classorg.apache.commons.httpclient.methods.multipart.PartBase
-