Class ContentType

java.lang.Object
org.apache.rat.api.ContentType

public class ContentType extends Object
Describe the MIME content type of a resource.
  • Constructor Details

    • ContentType

      public ContentType(String mediaType, String subType, Map<String,​String> parameters)
      Constructs content types, performing any necessary conversions.
      Parameters:
      mediaType - not null
      subType - not null
      parameters - not null
  • Method Details

    • getMediaType

      public String getMediaType()
      Gets the media type, normalised to lower case.
      Returns:
      media type, not null
    • getSubType

      public String getSubType()
      Gets the media sub type normalised to lower case
      Returns:
      sub type, not null
    • getParameters

      public Map<String,​String> getParameters()
      Gets an immutable map containing all content type parameters with keys normalised to lower case.
      Returns:
      not null