# Class VCFPercentEncodedTextTransformer

java.lang.Object
htsjdk.variant.vcf.VCFPercentEncodedTextTransformer

All Implemented Interfaces:
  `VCFTextTransformer`

public class VCFPercentEncodedTextTransformer extends Object implements VCFTextTransformer
Text transformer for attribute values embedded in VCF. VCF version 4.3 supports percent-encoding of characters that have special meaning in VCF.

## Constructor Summary

Constructors
Constructor
Description
`VCFPercentEncodedTextTransformer()`

## Method Summary

Modifier and Type
Method
Description
`protected static String`
`decodePercentEncodedChars(String rawText)`
Transform input strings containing embedded percent=encoded characters.
`String`
`decodeText(String rawPart)`
Transform a single string, replacing % encoded values with their corresponding text.
`List<String>`
`decodeText(List<String> rawParts)`
Transform a list of strings, replacing % encoded values with their corresponding text in each string.

### Methods inherited from class Object

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

## Constructor Details

### VCFPercentEncodedTextTransformer

public VCFPercentEncodedTextTransformer()

## Method Details

### decodeText

public String decodeText(String rawPart)
Transform a single string, replacing % encoded values with their corresponding text.

Specified by:
  `decodeText` in interface `VCFTextTransformer`
Parameters:
  `rawPart` - the raw string to be decoded
Returns:
  the decoded string
Throws:
  `TribbleException` - if the the encoding is uninterpretable

### decodeText

public List<String> decodeText(List<String> rawParts)
Transform a list of strings, replacing % encoded values with their corresponding text in each string.

Specified by:
  `decodeText` in interface `VCFTextTransformer`
Parameters:
  `rawParts` - a list of raw strings
Returns:
  a list of decoded strings
Throws:
  `TribbleException` - if the the encoding is uninterpretable

### decodePercentEncodedChars

protected static String decodePercentEncodedChars(String rawText)
Transform input strings containing embedded percent=encoded characters. For example, when given the string '%3D%41' will return the string '=A'.

Parameters:
  `rawText` - a string containing zero or more embedded encodings
Returns:
  a string with all encoded characters replaced with the corresponding character
Throws:
  `TribbleException` - if the the encoding is uninterpretable