public class ContentType extends Object
This class is a stripped-down version of
uk.ac.starlink.util.ContentType.
| Constructor and Description |
|---|
ContentType(String type,
String subtype)
Constructs a ContentType from type and subtype strings.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getSubtype()
Returns the Subtype part of this content type.
|
String |
getType()
Returns the Type part of this content type.
|
int |
hashCode() |
boolean |
matches(String type,
String subtype)
Indicates whether the type and subtype match a given pair.
|
static ContentType |
parse(String txt)
Parses a Content-Type (MIME type) string.
|
String |
toString() |
public String getType()
public String getSubtype()
public boolean matches(String type, String subtype)
type - required type part (case-insensitive)subtype - required subtype part (case-insensitive)public static ContentType parse(String txt)
txt - text representation of MIME typeCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.