java.lang.Object | |
↳ | org.apache.commons.codec.net.QCodec |
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.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | POSTFIX | Prefix | |||||||||
String | PREFIX | Postfix | |||||||||
char | SEP | Separator. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Default constructor.
| |||||||||||
Constructor which allows for the selection of a default charset
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Decodes a quoted-printable object into its original form.
| |||||||||||
Decodes a quoted-printable string into its original form.
| |||||||||||
Encodes an object into its quoted-printable form using the default charset.
| |||||||||||
Encodes a string into its quoted-printable form using the specified charset.
| |||||||||||
Encodes a string into its quoted-printable form using the default charset.
| |||||||||||
The default charset used for string decoding and encoding.
| |||||||||||
Tests if optional tranformation of SPACE characters is to be used
| |||||||||||
Defines whether optional tranformation of SPACE characters is to be used
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Applies an RFC 1522 compliant decoding scheme to the given string of text.
| |||||||||||
Decodes an array of bytes using the defined encoding scheme
| |||||||||||
Encodes an array of bytes using the defined encoding scheme
| |||||||||||
Applies an RFC 1522 compliant encoding scheme to the given string of text with the
given charset.
| |||||||||||
Returns the codec name (referred to as encoding in the RFC 1522)
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.apache.commons.codec.Decoder
| |||||||||||
From interface
org.apache.commons.codec.Encoder
| |||||||||||
From interface
org.apache.commons.codec.StringDecoder
| |||||||||||
From interface
org.apache.commons.codec.StringEncoder
|
Prefix
Postfix
Separator.
Default constructor.
Constructor which allows for the selection of a default charset
charset | the default string charset to use. |
---|
Decodes a quoted-printable object into its original form. Escaped characters are converted back to their original representation.
pObject | quoted-printable object to convert into its original form |
---|
DecoderException | Thrown if the argument is not a String . Thrown if a failure condition is
encountered during the decode process.
|
---|
Decodes a quoted-printable string into its original form. Escaped characters are converted back to their original representation.
pString | quoted-printable string to convert into its original form |
---|
DecoderException | A decoder exception is thrown if a failure condition is encountered during the decode process. |
---|
Encodes an object into its quoted-printable form using the default charset. Unsafe characters are escaped.
pObject | object to convert to quoted-printable form |
---|
EncoderException | thrown if a failure condition is encountered during the encoding process. |
---|
Encodes a string into its quoted-printable form using the specified charset. Unsafe characters are escaped.
pString | string to convert to quoted-printable form |
---|---|
charset | the charset for pString |
EncoderException | thrown if a failure condition is encountered during the encoding process. |
---|
Encodes a string into its quoted-printable form using the default charset. Unsafe characters are escaped.
pString | string to convert to quoted-printable form |
---|
EncoderException | thrown if a failure condition is encountered during the encoding process. |
---|
The default charset used for string decoding and encoding.
Tests if optional tranformation of SPACE characters is to be used
true
if SPACE characters are to be transformed, false
otherwise
Defines whether optional tranformation of SPACE characters is to be used
b | true if SPACE characters are to be transformed, false otherwise
|
---|
Applies an RFC 1522 compliant decoding scheme to the given string of text. This method
processes the "encoded-word" header common to all the RFC 1522 codecs and then invokes
doEncoding(byte[])
method of a concrete class to perform the specific deconding.
text | a string to decode |
---|
null
if the input is null
.DecoderException | thrown if there is an error conidition during the Decoding process. |
---|---|
UnsupportedEncodingException | thrown if charset specified in the "encoded-word" header is not supported |
Decodes an array of bytes using the defined encoding scheme
bytes | Data to be decoded |
---|
DecoderException |
---|
Encodes an array of bytes using the defined encoding scheme
bytes | Data to be encoded |
---|
Applies an RFC 1522 compliant encoding scheme to the given string of text with the
given charset. This method constructs the "encoded-word" header common to all the
RFC 1522 codecs and then invokes doEncoding(byte[])
method of a concrete
class to perform the specific enconding.
text | a string to encode |
---|---|
charset | a charset to be used |
EncoderException | thrown if there is an error conidition during the Encoding process. |
---|---|
UnsupportedEncodingException | thrown if charset is not supported |
Returns the codec name (referred to as encoding in the RFC 1522)