类 MediaType
java.lang.Object
com.lark.oapi.okhttp.MediaType
An RFC 2045 Media Type, appropriate to describe
the content type of an HTTP request or response body.
-
方法概要
修饰符和类型方法说明charset()Returns the charset of this media type, or null if this media type doesn't specify a charset.Returns the charset of this media type, ordefaultValueif either this media type doesn't specify a charset, of it its charset is unsupported by the current runtime.booleanstatic MediaTypeReturns a media type forstring.inthashCode()static MediaTypeReturns a media type forstring, or null ifstringis not a well-formed media type.subtype()Returns a specific media subtype, such as "plain" or "png", "mpeg", "mp4" or "xml".toString()Returns the encoded media type, like "text/plain; charset=utf-8", appropriate for use in a Content-Type header.type()Returns the high-level media type, such as "text", "image", "audio", "video", or "application".
-
方法详细资料
-
get
Returns a media type forstring.- 抛出:
IllegalArgumentException- ifstringis not a well-formed media type.
-
parse
Returns a media type forstring, or null ifstringis not a well-formed media type. -
type
Returns the high-level media type, such as "text", "image", "audio", "video", or "application". -
subtype
Returns a specific media subtype, such as "plain" or "png", "mpeg", "mp4" or "xml". -
charset
Returns the charset of this media type, or null if this media type doesn't specify a charset. -
charset
Returns the charset of this media type, ordefaultValueif either this media type doesn't specify a charset, of it its charset is unsupported by the current runtime. -
toString
Returns the encoded media type, like "text/plain; charset=utf-8", appropriate for use in a Content-Type header. -
equals
-
hashCode
public int hashCode()
-