com.ls.util.text
Class EncoderDecoder
java.lang.Object
|
+--com.ls.util.text.EncoderDecoder
- public class EncoderDecoder
- extends Object
Method Summary |
static String |
decode(String sourceString,
char[] charsToDecode,
String[] decodeString)
decodes the value of the variables before they get displayed in the template |
static String |
decode(String sourceString,
int decodeType)
decodes the value of the variables before they get displayed in the template |
static String |
encode(String sourceString,
char[] charsToEncode,
String[] encodeString)
encodes the values of the variables before they get displayed in the template |
static String |
encode(String sourceString,
int encodeType)
encodes the values of the variables before they get displayed in the template |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EncoderDecoder
public EncoderDecoder()
encode
public static String encode(String sourceString,
int encodeType)
throws InvalidArgumentException,
MissingDataException
- encodes the values of the variables before they get displayed in the template
- Parameters:
sourceString
- The source which has to be encodedencodeType
- The type of encoding (like ESCAPE,URL,..)- Returns:
- the encoded source string
- Throws:
InvalidArgumentException
- If any of the parameter is nullMissingDataException
- If the encode type is unkown
encode
public static String encode(String sourceString,
char[] charsToEncode,
String[] encodeString)
throws InvalidArgumentException
- encodes the values of the variables before they get displayed in the template
- Parameters:
sourceString
- The source which has to be encodedcharsToEncode
- the chracter set which need to be encodedencodeString
- the encode string set- Returns:
- the encoded source string
- Throws:
InvalidArgumentException
- If any of the parameter is null
decode
public static String decode(String sourceString,
int decodeType)
throws InvalidArgumentException,
MissingDataException
- decodes the value of the variables before they get displayed in the template
- Parameters:
sourceString
- The source which has to be docodeddecodeType
- The type of decoding (like ESCAPE,URL,..)- Returns:
- the decoded source string
- Throws:
InvalidArgumentException
- If any of the parameter is nullMissingDataException
- If the decode type is unkown
decode
public static String decode(String sourceString,
char[] charsToDecode,
String[] decodeString)
throws InvalidArgumentException
- decodes the value of the variables before they get displayed in the template
- Parameters:
sourceString
- The source which has to be docodedcharsToDecode
- the chracter set which need to be decodeddecodeString
- the decode string set- Returns:
- the decoded source string
- Throws:
InvalidArgumentException
- If any of the parameter is null