Class PartBase
- java.lang.Object
-
- org.asynchttpclient.request.body.multipart.PartBase
-
- All Implemented Interfaces:
Part
- Direct Known Subclasses:
FileLikePart
,StringPart
public abstract class PartBase extends Object implements Part
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 headerString
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()
-
-
-
Constructor Detail
-
PartBase
protected PartBase(String name, String contentType, Charset charset, String contentId, String transferEncoding)
Constructor.- Parameters:
name
- The name of the part, ornull
contentType
- The content type, ornull
charset
- The character encoding, ornull
contentId
- The content id, ornull
transferEncoding
- The transfer encoding, ornull
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:Part
Return the name of this part.
-
getContentType
public String getContentType()
Description copied from interface:Part
Returns the content type of this part.- Specified by:
getContentType
in interfacePart
- Returns:
- the content type, or
null
to exclude the content type header
-
getCharset
public Charset getCharset()
Description copied from interface:Part
Return the character encoding of this part.- Specified by:
getCharset
in interfacePart
- Returns:
- the character encoding, or
null
to exclude the character encoding header
-
getTransferEncoding
public String getTransferEncoding()
Description copied from interface:Part
Return the transfer encoding of this part.- Specified by:
getTransferEncoding
in interfacePart
- Returns:
- the transfer encoding, or
null
to exclude the transfer encoding header
-
getContentId
public String getContentId()
Description copied from interface:Part
Return the content ID of this part.- Specified by:
getContentId
in interfacePart
- Returns:
- the content ID, or
null
to exclude the content ID header
-
getDispositionType
public String getDispositionType()
Description copied from interface:Part
Gets the disposition-type to be used in Content-Disposition header- Specified by:
getDispositionType
in interfacePart
- Returns:
- the disposition-type
-
setDispositionType
public void setDispositionType(String dispositionType)
-
getCustomHeaders
public List<Param> getCustomHeaders()
- Specified by:
getCustomHeaders
in interfacePart
-
-