Class MediaType
java.lang.Object
org.springframework.extensions.webscripts.MediaType
Represents a MediaType as described at
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MediaType
Construct- Parameters:
mediatype- string representation of mediatype e.g. text/html;level=1;q=0.8
-
-
Method Details
-
getType
- Returns:
- type
-
getSubtype
- Returns:
- subtype
-
getParams
- Returns:
- params
-
getQuality
public float getQuality()- Returns:
- quality factory
-
compare
Compare to another media type- Parameters:
to- media type to compare to- Returns:
- score representing how close a match the compared media types are
-
hashCode
public int hashCode() -
equals
-
toString
-
main
Simple exampe usage- Parameters:
args- String[]
-