Package com.icegreen.greenmail.util
Class EncodingUtil
java.lang.Object
com.icegreen.greenmail.util.EncodingUtil
Helper for handling encodings.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdecodeBase64(String encoded) Decodes the base64 encoded string to a string.static InputStreamConverts the string of given content to an input stream.static StringtoString(InputStream is, Charset charset)
-
Field Details
-
EIGHT_BIT_ENCODING
Constant for 8-Bit encoding, which can be resembled by "ISO-8859-1"- See Also:
-
CHARSET_EIGHT_BIT_ENCODING
Predefined Charset for 8-Bit encoding.
-
-
Method Details
-
toStream
Converts the string of given content to an input stream.- Parameters:
content- the string content.charset- the charset for conversion.- Returns:
- the stream (should be closed by invoker).
-
toString
-
decodeBase64
Decodes the base64 encoded string to a string.- Parameters:
encoded- the base64 encoded value- Returns:
- a string of the decoded value (UTF-8)
-