Package org.apache.rat.api
Class ContentType
- java.lang.Object
-
- org.apache.rat.api.ContentType
-
public class ContentType extends java.lang.ObjectDescribe the MIME content type of a resource.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringmediaTypeprivate java.util.Map<java.lang.String,java.lang.String>parametersprivate java.lang.StringsubType
-
Constructor Summary
Constructors Constructor Description ContentType(java.lang.String mediaType, java.lang.String subType, java.util.Map<java.lang.String,java.lang.String> parameters)Constructs content types, performing an necessary conversions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMediaType()Gets the media type, normalised to lower case.java.util.Map<java.lang.String,java.lang.String>getParameters()Gets an immutable map containing all content type parameters with keys normalised to lower case.java.lang.StringgetSubType()Gets the media sub type normalised to lower case
-
-
-
Constructor Detail
-
ContentType
public ContentType(java.lang.String mediaType, java.lang.String subType, java.util.Map<java.lang.String,java.lang.String> parameters)Constructs content types, performing an necessary conversions.- Parameters:
mediaType- not nullsubType- not nullparameters- not null
-
-
Method Detail
-
getMediaType
public java.lang.String getMediaType()
Gets the media type, normalised to lower case.- Returns:
- media type, not null
-
getSubType
public java.lang.String getSubType()
Gets the media sub type normalised to lower case- Returns:
- sub type, not null
-
getParameters
public java.util.Map<java.lang.String,java.lang.String> getParameters()
Gets an immutable map containing all content type parameters with keys normalised to lower case.- Returns:
- not null
-
-