# Class ContentTypeOptions

java.lang.Object
uk.ac.starlink.ttools.taplint.ContentTypeOptions

public class ContentTypeOptions extends Object
Defines a permitted class of MIME types.

Since:
  24 May 2016
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`ContentTypeOptions(uk.ac.starlink.util.ContentType[] permittedTypes)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`checkType(Reporter reporter, String declaredTypeTxt, URL url)`
Checks a declared Content-Type string against the permitted values for this object.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ContentTypeOptions

public ContentTypeOptions(uk.ac.starlink.util.ContentType[] permittedTypes)
Constructor.

Parameters:
  `permittedTypes` - array of MIME type/subtype strings allowed

## Method Details

### checkType

public void checkType(Reporter reporter, String declaredTypeTxt, URL url)
Checks a declared Content-Type string against the permitted values for this object. Validation messages are reported in case of non-compliance.

Parameters:
  `reporter` - destination for validation messages
  `declaredTypeTxt` - Content-Type to assess
  `url` - source of content, used for report messages