接口 ContentDescriptor
- 所有已知子接口:
BodyDescriptor
public interface ContentDescriptor
Description:
Title:首亨软件 - TSS/CRM等
- 从以下版本开始:
- Aug 16, 2012
-
方法概要
修饰符和类型方法说明The body descriptors character set, defaulted appropriately for the MIME type.longReturns the body descriptors content-length.Gets the defaulted MIME media type for this content.Returns the body descriptors MIME type.Gets the defaulted MIME sub type for this content.Returns the body descriptors transfer encoding.
-
方法详细资料
-
getMimeType
String getMimeType()Returns the body descriptors MIME type.- 返回:
- 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.
- 另请参阅:
-
getMediaType
String getMediaType()Gets the defaulted MIME media type for this content. For exampleTEXT,IMAGE,MULTIPART- 返回:
- the MIME media type when content-type specified,
otherwise the correct default (
TEXT) - 另请参阅:
-
getSubType
String getSubType()Gets the defaulted MIME sub type for this content.- 返回:
- the MIME media type when content-type is specified,
otherwise the correct default (
PLAIN) - 另请参阅:
-
getCharset
String getCharset()The 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.- 返回:
- 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.
-
getTransferEncoding
String getTransferEncoding()Returns the body descriptors transfer encoding.- 返回:
- The transfer encoding. Must not be null, but "7bit", if no transfer-encoding was specified.
-
getContentLength
long getContentLength()Returns the body descriptors content-length.- 返回:
- Content length, if known, or -1, to indicate the absence of a content-length header.
-