Class RFC1522QCodec

java.lang.Object
com.helger.commons.codec.AbstractRFC1522Codec
com.helger.commons.codec.RFC1522QCodec
All Implemented Interfaces:
ICodec<String>, IDecoder<String,String>, IEncoder<String,String>

public class RFC1522QCodec extends AbstractRFC1522Codec
Similar to the Quoted-Printable content-transfer-encoding defined in RFC 1521 and designed to allow text containing mostly ASCII characters to be decipherable on an ASCII terminal without decoding.

RFC 1522 describes techniques to allow the encoding of non-ASCII text in various portions of a RFC 822 [2] message header, in a manner which is unlikely to confuse existing message handling software.

This class is conditionally thread-safe. The instance field m_bEncodeBlanks is mutable setEncodeBlanks(boolean) but is not volatile, and accesses are not synchronised. If an instance of the class is shared between threads, the caller needs to ensure that suitable synchronisation is used to ensure safe publication of the value between threads, and must not invoke setEncodeBlanks(boolean) after initial setup.

See Also:
  • Field Details

    • DEFAULT_ENCODE_BLANKS

      public static final boolean DEFAULT_ENCODE_BLANKS
      See Also:
  • Constructor Details

    • RFC1522QCodec

      public RFC1522QCodec()
      Default constructor with the UTF-8 charset.
    • RFC1522QCodec

      public RFC1522QCodec(@Nonnull Charset aCharset)
      Constructor which allows for the selection of a default charset.
      Parameters:
      aCharset - the default string charset to use.
  • Method Details