public class MediaType extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DEFAULT_DOCUMENT_CHARACTER_ENCODING
Default document encoding
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getCharset() |
int |
getParameterCount() |
String |
getParameterValue(String parameter) |
String |
getSubtype() |
String |
getType() |
static boolean |
isHtmlType(String type) |
static MediaType |
parse(String inputStr)
Parses a MediaType value, either from a HTTP header or from an application.
|
static MediaType |
parseFast(String input)
Parses a MediaType value, either from a HTTP header or from an application.
|
String |
toString() |
String |
toStringNoCharset() |
public static boolean isHtmlType(String type)
public String getType()
public String getSubtype()
public String getCharset()
public int getParameterCount()
public String toStringNoCharset()
public static MediaType parseFast(String input)
input - a reader over the header textpublic static MediaType parse(String inputStr) throws IOException
inputStr - a reader over the header textIOException - if there was a problem reading the inputCopyright © 2021. All rights reserved.