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 voidaddCustomHeader(String name, String value)CharsetgetCharset()Return the character encoding of this part.StringgetContentId()Return the content ID of this part.StringgetContentType()Returns the content type of this part.List<Param>getCustomHeaders()StringgetDispositionType()Gets the disposition-type to be used in Content-Disposition headerStringgetName()Return the name of this part.StringgetTransferEncoding()Return the transfer encoding of this part.voidsetCustomHeaders(List<Param> customHeaders)voidsetDispositionType(String dispositionType)StringtoString()
-
-
-
Constructor Detail
-
PartBase
protected PartBase(String name, String contentType, Charset charset, String contentId, String transferEncoding)
Constructor.- Parameters:
name- The name of the part, ornullcontentType- The content type, ornullcharset- The character encoding, ornullcontentId- The content id, ornulltransferEncoding- The transfer encoding, ornull
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:PartReturn the name of this part.
-
getContentType
public String getContentType()
Description copied from interface:PartReturns the content type of this part.- Specified by:
getContentTypein interfacePart- Returns:
- the content type, or
nullto exclude the content type header
-
getCharset
public Charset getCharset()
Description copied from interface:PartReturn the character encoding of this part.- Specified by:
getCharsetin interfacePart- Returns:
- the character encoding, or
nullto exclude the character encoding header
-
getTransferEncoding
public String getTransferEncoding()
Description copied from interface:PartReturn the transfer encoding of this part.- Specified by:
getTransferEncodingin interfacePart- Returns:
- the transfer encoding, or
nullto exclude the transfer encoding header
-
getContentId
public String getContentId()
Description copied from interface:PartReturn the content ID of this part.- Specified by:
getContentIdin interfacePart- Returns:
- the content ID, or
nullto exclude the content ID header
-
getDispositionType
public String getDispositionType()
Description copied from interface:PartGets the disposition-type to be used in Content-Disposition header- Specified by:
getDispositionTypein interfacePart- Returns:
- the disposition-type
-
setDispositionType
public void setDispositionType(String dispositionType)
-
getCustomHeaders
public List<Param> getCustomHeaders()
- Specified by:
getCustomHeadersin interfacePart
-
-