com.silverpeas.ical
Class StringUtils
java.lang.Object
com.silverpeas.ical.StringUtils
public final class StringUtils
- extends Object
Common String utilities (formatters, converters, etc).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringUtils
public StringUtils()
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
decodeToString
public static String decodeToString(byte[] bytes,
String encoding)
decodeToString
public static String decodeToString(byte[] bytes,
Charset encoding)
decodePassword
public static String decodePassword(String encodedPassword)
throws Exception
- Throws:
Exception
stringToLong
public static long stringToLong(String string)
throws NumberFormatException
- Throws:
NumberFormatException
decodeBASE64
public static String decodeBASE64(String string)
- Decodes a BASE64-encoded string.
- Parameters:
string
- BASE64 string
- Returns:
- String the decoded bytes
- Throws:
UnsupportedEncodingException
encodeBASE64
public static String encodeBASE64(byte[] data)
- Encode the input bytes into BASE64 format.
- Parameters:
data
- - byte array to encode
- Returns:
- encoded string
Copyright © 2016 Silverpeas. All Rights Reserved.