Package com.icegreen.greenmail.util
Class EncodingUtil
- java.lang.Object
-
- com.icegreen.greenmail.util.EncodingUtil
-
public class EncodingUtil extends Object
Helper for handling encodings.
-
-
Field Summary
Fields Modifier and Type Field Description static CharsetCHARSET_EIGHT_BIT_ENCODINGPredefined Charset for 8-Bit encoding.static StringEIGHT_BIT_ENCODINGConstant for 8-Bit encoding, which can be resembled by "ISO-8859-1"
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringdecodeBase64(String encoded)Decodes the base64 encoded string to a string.static InputStreamtoStream(String content, Charset charset)Converts the string of given content to an input stream.static StringtoString(InputStream is, Charset charset)
-
-
-
Field Detail
-
EIGHT_BIT_ENCODING
public static final String EIGHT_BIT_ENCODING
Constant for 8-Bit encoding, which can be resembled by "ISO-8859-1"- See Also:
- Constant Field Values
-
CHARSET_EIGHT_BIT_ENCODING
public static final Charset CHARSET_EIGHT_BIT_ENCODING
Predefined Charset for 8-Bit encoding.
-
-
Method Detail
-
toStream
public static InputStream toStream(String content, Charset charset)
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
public static String toString(InputStream is, Charset charset)
-
-