public abstract class AbstractContentBody extends Object implements ContentBody
| Constructor and Description |
|---|
AbstractContentBody(org.apache.hc.core5.http.ContentType contentType) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCharset()
The body descriptors character set, defaulted appropriately for the MIME type.
|
org.apache.hc.core5.http.ContentType |
getContentType() |
String |
getMediaType()
Gets the defaulted MIME media type for this content.
|
String |
getMimeType()
Returns the body descriptors MIME type.
|
String |
getSubType()
Gets the defaulted MIME sub type for this content.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFilename, writeTogetContentLengthpublic AbstractContentBody(org.apache.hc.core5.http.ContentType contentType)
public org.apache.hc.core5.http.ContentType getContentType()
public String getMimeType()
ContentDescriptorgetMimeType in interface ContentDescriptorContentDescriptor.getMediaType(),
ContentDescriptor.getSubType()public String getMediaType()
ContentDescriptorTEXT, IMAGE, MULTIPARTgetMediaType in interface ContentDescriptorTEXT)ContentDescriptor.getMimeType()public String getSubType()
ContentDescriptorgetSubType in interface ContentDescriptorPLAIN)ContentDescriptor.getMimeType()public String getCharset()
ContentDescriptorThe body descriptors character set, defaulted appropriately for the MIME type.
For TEXT types, this will be defaulted to us-ascii.
For other types, when the charset parameter is missing this property will be null.
getCharset in interface ContentDescriptorTEXT types, when unset will
be set to default us-ascii. For other types, when unset,
null will be returned.Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.