public class MimeType extends Object implements Comparable<MimeType>
Constructor and Description |
---|
MimeType(String type,
String subtype) |
MimeType(String type,
String subtype,
float quality) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(MimeType other)
Content type are ordered first by quality then by type, then by subtype.
|
float |
getQuality() |
String |
getSubtype() |
String |
getType() |
boolean |
isAcceptable(MimeType mimeType)
Whether the specified content type is acceptable by this content type.
|
static MimeType |
parse(String spec) |
String |
toString() |
public String getType()
public String getSubtype()
public float getQuality()
public int compareTo(MimeType other)
compareTo
in interface Comparable<MimeType>
other
- Content type to compare to.public boolean isAcceptable(MimeType mimeType)
mimeType
- The content type.Copyright © 2016. All rights reserved.