Class StringUtils
- java.lang.Object
-
- org.silverpeas.core.web.calendar.ical.StringUtils
-
public final class StringUtils extends Object
Common String utilities (formatters, converters, etc).
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
decodeBASE64(String string)
Decodes a BASE64-encoded string.static String
decodePassword(String encodedPassword)
static String
decodeToString(byte[] bytes, String encoding)
static String
decodeToString(byte[] bytes, Charset encoding)
static String
encodeBASE64(byte[] data)
Encode the input bytes into BASE64 format.static byte[]
encodeString(String string, String encoding)
static byte[]
encodeString(String string, Charset encoding)
-
-
-
Method Detail
-
encodeString
public static byte[] encodeString(String string, Charset encoding) throws CharacterCodingException
- Throws:
CharacterCodingException
-
encodeString
public static byte[] encodeString(String string, String encoding) throws CharacterCodingException
- Throws:
CharacterCodingException
-
decodeBASE64
public static String decodeBASE64(String string)
Decodes a BASE64-encoded string.- Parameters:
string
- BASE64 string- Returns:
- String the decoded bytes
-
encodeBASE64
public static String encodeBASE64(byte[] data)
Encode the input bytes into BASE64 format.- Parameters:
data
- - byte array to encode- Returns:
- encoded string
-
-