Package org.subethamail.smtp.util
Class TextUtils
java.lang.Object
org.subethamail.smtp.util.TextUtils
- Author:
- Jeff Schnitzer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]getAsciiBytes(String str) static byte[]static StringgetStringAscii(byte[] bytes) Converts the specified bytes to String using US-ASCII encoding.static StringgetStringUtf8(byte[] bytes) Converts the specified bytes to String using UTF-8 encoding.static byte[]getUtf8Bytes(String str) static StringjoinTogether(Collection<String> items, String delim)
-
Constructor Details
-
TextUtils
public TextUtils()
-
-
Method Details
-
joinTogether
- Returns:
- a delimited string containing the specified items
-
getBytes
- Returns:
- the value of str.getBytes() without the idiotic checked exception
-
getAsciiBytes
- Returns:
- the string as US-ASCII bytes
-
getUtf8Bytes
- Returns:
- the string as UTF-8 bytes
-
getStringAscii
Converts the specified bytes to String using US-ASCII encoding. -
getStringUtf8
Converts the specified bytes to String using UTF-8 encoding.
-