com.devexperts.qd.qtp.text
Class TextCoding

java.lang.Object
  extended by com.devexperts.qd.qtp.text.TextCoding

public class TextCoding
extends java.lang.Object

Utility class that encodes/decodes any strings into special text format.


Constructor Summary
TextCoding()
           
 
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 unicode chars to encoded \uxxxx and escapes special characters with a preceding slash.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextCoding

public TextCoding()
Method Detail

encode

public static java.lang.String encode(java.lang.String s)
Converts unicode chars 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.