com.devexperts.qd.qtp.text
Class TextCoding
java.lang.Object
com.devexperts.qd.qtp.text.TextCoding
public class TextCoding
- extends java.lang.Object
Utility class that encodes/decodes any strings into special text format.
Method Summary |
static java.lang.String |
decode(java.lang.String s)
Converts encoded \uxxxx to unicode chars
and changes special saved chars to their original forms. |
static java.lang.String |
encode(java.lang.String s)
Converts unicodes to encoded \uxxxx and escapes
special characters with a preceding slash. |
static boolean |
isNewLine(byte b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEPARATOR
public static final char SEPARATOR
- See Also:
- Constant Field Values
SPECIAL_SYMBOL
public static final char SPECIAL_SYMBOL
- See Also:
- Constant Field Values
COMMENT_SYMBOL
public static final char COMMENT_SYMBOL
- See Also:
- Constant Field Values
BLOCK_TYPE_PREFIX
public static final java.lang.String BLOCK_TYPE_PREFIX
- See Also:
- Constant Field Values
TextCoding
public TextCoding()
encode
public static java.lang.String encode(java.lang.String s)
- Converts unicodes to encoded \uxxxx and escapes
special characters with a preceding slash.
- Parameters:
s
- string to convert
- Returns:
- converted string.
decode
public static java.lang.String decode(java.lang.String s)
throws com.devexperts.qd.qtp.text.CorruptedTextFormatException
- Converts encoded \uxxxx to unicode chars
and changes special saved chars to their original forms.
- Parameters:
s
- string to convert
- Returns:
- converted string.
- Throws:
CorruptedTextFormatException
- if it is impossible to decode s.
isNewLine
public static boolean isNewLine(byte b)