public class MediaType extends Object
Constructor and Description |
---|
MediaType(MediaType other) |
MediaType(String type,
String subType)
Create a media type from type and subType
|
MediaType(String type,
String subType,
String charset)
Create a media type from type and subType
|
Modifier and Type | Method and Description |
---|---|
static MediaType |
create(String string) |
static MediaType |
create(String contentType,
String charset) |
static MediaType |
create(String contentType,
String subType,
String charset) |
static MediaType |
createFromContentType(String string) |
boolean |
equals(Object object) |
String |
getCharset() |
String |
getContentType() |
String |
getParameter(String name) |
String |
getSubType() |
String |
getType() |
int |
hashCode() |
static org.apache.jena.atlas.web.MediaType.ParsedMediaType |
parse(String string) |
String |
toHeaderString()
Format for use in HTTP header
|
String |
toString()
Format to show structure - intentionally different from header
form so you can tell parsing happened correctly
|
public MediaType(MediaType other)
public static org.apache.jena.atlas.web.MediaType.ParsedMediaType parse(String string)
public String toHeaderString()
public String toString()
public String getContentType()
public String getCharset()
public String getSubType()
public String getType()
Licenced under the Apache License, Version 2.0