org.openjena.atlas.web
Class MediaType
java.lang.Object
org.openjena.atlas.web.MediaType
- Direct Known Subclasses:
- MediaRange
public class MediaType
- extends Object
A structure to represent a media type.
Se also the Apache httpd documentation.
strCharset
public static final String strCharset
- See Also:
- Constant Field Values
MediaType
public MediaType(MediaType other)
MediaType
public MediaType(String string)
create
public static MediaType create(String contentType,
String charset)
create
public static MediaType create(String contentType,
String subType,
String charset)
toHeaderString
public String toHeaderString()
- Format for use in HTTP header
toString
public String toString()
- Format to show structure - intentionally different from header
form so you can tell parsing happened correctly
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object object)
- Overrides:
equals
in class Object
getParameter
public String getParameter(String name)
setParameter
public void setParameter(String name,
String value)
getContentType
public String getContentType()
getCharset
public String getCharset()
getSubType
public String getSubType()
setSubType
public void setSubType(String subType)
getType
public String getType()
setType
public void setType(String type)
Licenced under the Apache License, Version 2.0