Class PartBase
java.lang.Object
org.apache.commons.httpclient.methods.multipart.Part
org.apache.commons.httpclient.methods.multipart.PartBase
- Direct Known Subclasses:
FilePart, StringPart
Provides setters and getters for the basic Part properties.
- Author:
- Michael Becke
-
Field Summary
Fields inherited from class 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, EXTRA, EXTRA_BYTES, QUOTE, QUOTE_BYTES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the character encoding of this part.Returns the content type of this part.getName()Returns the name.Returns the transfer encoding of this part.voidsetCharSet(String charSet) Sets the character encoding.voidsetContentType(String contentType) Sets the content type.voidSets the part name.voidsetTransferEncoding(String transferEncoding) Sets the transfer encoding.Methods inherited from class Part
getBoundary, getLengthOfParts, getLengthOfParts, getPartBoundary, isRepeatable, length, lengthOfData, send, sendContentTypeHeader, sendData, sendDispositionHeader, sendEnd, sendEndOfHeader, sendParts, sendParts, sendStart, sendTransferEncodingHeader, toString
-
Constructor Details
-
PartBase
-
-
Method Details
-
getName
-
getContentType
Returns the content type of this part.- Specified by:
getContentTypein classPart- Returns:
- String The name.
-
getCharSet
Return the character encoding of this part.- Specified by:
getCharSetin classPart- Returns:
- String The name.
-
getTransferEncoding
Returns the transfer encoding of this part.- Specified by:
getTransferEncodingin classPart- Returns:
- String The name.
-
setCharSet
Sets the character encoding.- Parameters:
charSet- the character encoding, ornullto exclude the character encoding header
-
setContentType
Sets the content type.- Parameters:
contentType- the content type, ornullto exclude the content type header
-
setName
-
setTransferEncoding
Sets the transfer encoding.- Parameters:
transferEncoding- the transfer encoding, ornullto exclude the transfer encoding header
-