Class AbstractContentBody
- java.lang.Object
-
- com.foxinmy.weixin4j.http.apache.content.AbstractContentBody
-
- All Implemented Interfaces:
ContentBody
- Direct Known Subclasses:
ByteArrayBody,FileBody,InputStreamBody,StringBody
public abstract class AbstractContentBody extends Object implements ContentBody
- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description AbstractContentBody(ContentType contentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCharset()The body descriptors character set, defaulted appropriately for the MIME type.ContentTypegetContentType()MimeTypegetMimeType()Returns the body descriptors MIME type.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.foxinmy.weixin4j.http.apache.content.ContentBody
getContentLength, getFilename, getTransferEncoding, writeTo
-
-
-
-
Constructor Detail
-
AbstractContentBody
public AbstractContentBody(ContentType contentType)
- Since:
- 4.3
-
-
Method Detail
-
getContentType
public ContentType getContentType()
- Since:
- 4.3
-
getMimeType
public MimeType getMimeType()
Description copied from interface:ContentBodyReturns the body descriptors MIME type.- Specified by:
getMimeTypein interfaceContentBody- Returns:
- The MIME type, which has been parsed from the content-type definition. Must not be null, but "text/plain", if no content-type was specified.
-
getCharset
public String getCharset()
Description copied from interface:ContentBodyThe body descriptors character set, defaulted appropriately for the MIME type.
For
TEXTtypes, this will be defaulted tous-ascii. For other types, when the charset parameter is missing this property will be null.- Specified by:
getCharsetin interfaceContentBody- Returns:
- Character set, which has been parsed from the content-type
definition. Not null for
TEXTtypes, when unset will be set to defaultus-ascii. For other types, when unset, null will be returned.
-
-