public class MIMEType extends Object implements Comparable<MIMEType>
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MIMEType other) |
String |
getFullType() |
String |
getMajorType() |
double |
getQuality() |
String |
getSubtype() |
boolean |
isAnyMajorType() |
boolean |
isAnySubtype() |
static MIMEType |
parse(String mimeType)
Parses the given MIME type string returning an instance of
MIMEType. |
String |
toString() |
public static MIMEType parse(String mimeType)
MIMEType.
The expected format for mimeType is
type/subtype[;q=x.y] .
An example of valid mime type is: application/rdf+xml;q=0.9mimeType - IllegalArgumentException - if the mimeType is not well formatted.public String getMajorType()
public String getSubtype()
public String getFullType()
public double getQuality()
public boolean isAnyMajorType()
public boolean isAnySubtype()
public int compareTo(MIMEType other)
compareTo in interface Comparable<MIMEType>Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.