public abstract class PartBase extends Object implements Part
CHARSET_BYTES, CONTENT_DISPOSITION_BYTES, CONTENT_ID_BYTES, CONTENT_TRANSFER_ENCODING_BYTES, CONTENT_TYPE_BYTES, CRLF_BYTES, EXTRA_BYTES, FORM_DATA_DISPOSITION_TYPE_BYTES, NAME_BYTES, QUOTE_BYTE
Constructor and Description |
---|
PartBase(String name,
String contentType,
Charset charset,
String contentId,
String transferEncoding)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addCustomHeader(String name,
String value) |
Charset |
getCharset()
Return the character encoding of this part.
|
String |
getContentId()
Return the content ID of this part.
|
String |
getContentType()
Returns the content type of this part.
|
List<Param> |
getCustomHeaders() |
String |
getDispositionType()
Gets the disposition-type to be used in Content-Disposition header
|
String |
getName()
Return the name of this part.
|
String |
getTransferEncoding()
Return the transfer encoding of this part.
|
void |
setCustomHeaders(List<Param> customHeaders) |
void |
setDispositionType(String dispositionType) |
String |
toString() |
public PartBase(String name, String contentType, Charset charset, String contentId, String transferEncoding)
name
- The name of the part, or null
contentType
- The content type, or null
charset
- The character encoding, or null
contentId
- The content id, or null
transferEncoding
- The transfer encoding, or null
public String getName()
Part
public String getContentType()
Part
getContentType
in interface Part
null
to exclude the content
type headerpublic Charset getCharset()
Part
getCharset
in interface Part
null
to exclude the
character encoding headerpublic String getTransferEncoding()
Part
getTransferEncoding
in interface Part
null
to exclude the
transfer encoding headerpublic String getContentId()
Part
getContentId
in interface Part
null
to exclude the content ID
headerpublic String getDispositionType()
Part
getDispositionType
in interface Part
public List<Param> getCustomHeaders()
getCustomHeaders
in interface Part
public void setDispositionType(String dispositionType)
Copyright © 2017. All Rights Reserved.