Implements methods common to all codecs defined in RFC 1522.
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.
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
RFC1522Codec.doEncoding(byte[]) method of a concrete class to perform the specific deconding.
Parameters: text - a string to decode throws: DecoderException - thrown if there is an error conidition during the Decoding process. throws: UnsupportedEncodingException - thrown if charset specified in the "encoded-word" header is not supported
Decodes an array of bytes using the defined encoding scheme
Parameters: bytes - Data to be decoded a byte array that contains decoded data throws: DecoderException - A decoder exception is thrown if a Decoder encounters a failure condition during the decode process.
Encodes an array of bytes using the defined encoding scheme
Parameters: bytes - Data to be encoded A byte array containing the encoded data throws: EncoderException - thrown if the Encoder encounters a failure condition during the encoding process.
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
RFC1522Codec.doEncoding(byte[]) method of a concrete
class to perform the specific enconding.
Parameters: text - a string to encode Parameters: charset - a charset to be used RFC 1522 compliant "encoded-word" throws: EncoderException - thrown if there is an error conidition during the Encoding process. throws: UnsupportedEncodingException - thrown if charset is not supported See Also:JRE character
* encoding names