Class MediaType
java.lang.Object
org.apache.tomcat.util.http.parser.MediaType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getParameterValue
(String parameter) getType()
static MediaType
parseMediaType
(StringReader input) Parses a MediaType value, either from an HTTP header or from an application.static String
parseMediaTypeOnly
(String input) A simplified media type parser that removes any parameters and just returns the media type and the subtype.toString()
-
Constructor Details
-
MediaType
-
-
Method Details
-
getType
-
getSubtype
-
getCharset
-
getParameterCount
public int getParameterCount() -
getParameterValue
-
toString
-
toStringNoCharset
-
parseMediaType
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
-
parseMediaTypeOnly
-