public static java.lang.StringBuilder decode(java.lang.CharSequence input)
Decodes a string that contains EncodedWords.
input - a string containing EncodedWords
the decoded string
public static java.lang.StringBuilder encode(java.lang.CharSequence input,
Takes a text in form of a CharSequence encoded in the given charset (e.g.
ISO-8859-1) and makes it US-ASCII compatible and RFC822 compatible for
the use as e.g. subject with special characters.
This algorithm tries to achieve several goals when decoding:
never encode a single character but try to encode whole words
if two words must be encoded and there a no more than 3 characters
inbetween, encode everything in one single encoded word
an encoded word must never be longer than 76 characters in total
ensure that no encodedWord is in a line-wrap (RFC822 advices to no
have more than 78 characters in a headerline)