# Class ContentCodingParameter

java.lang.Object
uk.ac.starlink.task.Parameter<Boolean>
uk.ac.starlink.task.BooleanParameter
uk.ac.starlink.ttools.task.ContentCodingParameter

public class ContentCodingParameter extends uk.ac.starlink.task.BooleanParameter
Parameter for configuring HTTP-level compression.

Since:
  6 May 2015
Author:
  Mark Taylor

## Field Summary

### Fields inherited from class uk.ac.starlink.task.Parameter

`BY_NAME`

## Constructor Summary

Constructors
Constructor
Description
`ContentCodingParameter()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`uk.ac.starlink.util.ContentCoding`
`codingValue(uk.ac.starlink.task.Environment env)`
Returns the content coding instance indicated by the current value of this parameter.
`boolean`
`fromCoding(uk.ac.starlink.util.ContentCoding coding)`
Returns the value that this parameter should take to result in a given ContentCoding.

### Methods inherited from class uk.ac.starlink.task.BooleanParameter

`booleanValue, setBooleanDefault, setNullPermitted, stringToObject`

### Methods inherited from class uk.ac.starlink.task.Parameter

`clearValue, getDescription, getName, getPosition, getPreferExplicit, getPrompt, getStringDefault, getUsage, getValueClass, isNullPermitted, objectToString, objectValue, setDescription, setDescription, setName, setPosition, setPreferExplicit, setPrompt, setStringDefault, setUsage, setValue, setValueFromObject, setValueFromString, stringValue, toArray, toString`

### Methods inherited from class Object

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

## Constructor Details

### ContentCodingParameter

public ContentCodingParameter()
Constructor.

## Method Details

### codingValue

public uk.ac.starlink.util.ContentCoding codingValue(uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException
Returns the content coding instance indicated by the current value of this parameter.

Parameters:
  `env` - execution envirionment
Returns:
  content-coding instance, not null
Throws:
  `uk.ac.starlink.task.TaskException`

### fromCoding

public boolean fromCoding(uk.ac.starlink.util.ContentCoding coding)
Returns the value that this parameter should take to result in a given ContentCoding.

Parameters:
  `coding` - input coding
Returns:
  boolean parameter value