Class MediaType
- java.lang.Object
-
- org.apache.tomcat.util.http.parser.MediaType
-
public class MediaType extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCharset()
int
getParameterCount()
String
getParameterValue(String parameter)
String
getSubtype()
String
getType()
static MediaType
parseMediaType(StringReader input)
Parses a MediaType value, either from an HTTP header or from an application.String
toString()
String
toStringNoCharset()
-
-
-
Constructor Detail
-
MediaType
protected MediaType(String type, String subtype, LinkedHashMap<String,String> parameters)
-
-
Method Detail
-
getType
public String getType()
-
getSubtype
public String getSubtype()
-
getCharset
public String getCharset()
-
getParameterCount
public int getParameterCount()
-
toStringNoCharset
public String toStringNoCharset()
-
parseMediaType
public static MediaType parseMediaType(StringReader input) throws IOException
Parses a MediaType value, either from an HTTP header or from an application.- Parameters:
input
- a reader over the header text- Returns:
- a MediaType parsed from the input, or null if not valid
- Throws:
IOException
- if there was a problem reading the input
-
-