org.openjena.atlas.web
Class MediaType

java.lang.Object
  extended by 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.


Field Summary
static String strCharset
           
 
Constructor Summary
MediaType(MediaType other)
           
MediaType(String string)
           
 
Method Summary
static MediaType create(String contentType, String charset)
           
static MediaType create(String contentType, String subType, String charset)
           
 boolean equals(Object object)
           
 String getCharset()
           
 String getContentType()
           
 String getParameter(String name)
           
 String getSubType()
           
 String getType()
           
 int hashCode()
           
 void setParameter(String name, String value)
           
 void setSubType(String subType)
           
 void setType(String type)
           
 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
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

strCharset

public static final String strCharset
See Also:
Constant Field Values
Constructor Detail

MediaType

public MediaType(MediaType other)

MediaType

public MediaType(String string)
Method Detail

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