Class PartBase
- java.lang.Object
-
- org.apache.commons.httpclient.methods.multipart.Part
-
- org.apache.commons.httpclient.methods.multipart.PartBase
-
- Direct Known Subclasses:
FilePart
,StringPart
public abstract class PartBase extends Part
Provides setters and getters for the basic Part properties.- Author:
- Michael Becke
-
-
Field Summary
-
Fields 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, EXTRA, EXTRA_BYTES, QUOTE, QUOTE_BYTES
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCharSet()
Return the character encoding of this part.String
getContentType()
Returns the content type of this part.String
getName()
Returns the name.String
getTransferEncoding()
Returns the transfer encoding of this part.void
setCharSet(String charSet)
Sets the character encoding.void
setContentType(String contentType)
Sets the content type.void
setName(String name)
Sets the part name.void
setTransferEncoding(String transferEncoding)
Sets the transfer encoding.-
Methods inherited from class org.apache.commons.httpclient.methods.multipart.Part
getBoundary, getLengthOfParts, getLengthOfParts, getPartBoundary, isRepeatable, length, lengthOfData, send, sendContentTypeHeader, sendData, sendDispositionHeader, sendEnd, sendEndOfHeader, sendParts, sendParts, sendStart, sendTransferEncodingHeader, toString
-
-
-
-
Method Detail
-
getName
public String getName()
Returns the name.- Specified by:
getName
in classPart
- Returns:
- The name.
- See Also:
Part.getName()
-
getContentType
public String getContentType()
Returns the content type of this part.- Specified by:
getContentType
in classPart
- Returns:
- String The name.
-
getCharSet
public String getCharSet()
Return the character encoding of this part.- Specified by:
getCharSet
in classPart
- Returns:
- String The name.
-
getTransferEncoding
public String getTransferEncoding()
Returns the transfer encoding of this part.- Specified by:
getTransferEncoding
in classPart
- Returns:
- String The name.
-
setCharSet
public void setCharSet(String charSet)
Sets the character encoding.- Parameters:
charSet
- the character encoding, ornull
to exclude the character encoding header
-
setContentType
public void setContentType(String contentType)
Sets the content type.- Parameters:
contentType
- the content type, ornull
to exclude the content type header
-
setName
public void setName(String name)
Sets the part name.- Parameters:
name
-
-
setTransferEncoding
public void setTransferEncoding(String transferEncoding)
Sets the transfer encoding.- Parameters:
transferEncoding
- the transfer encoding, ornull
to exclude the transfer encoding header
-
-