Class Codec
java.lang.Object
com.realtime.crossfire.jxclient.util.Codec
Utility class to encode arbitrary Strings to fit in a single text line. For
any string
s, encode(s) is a string that does not contain \r
or \n and s.equals(decode(encode(s))) holds.-
Method Summary
-
Method Details
-
encode
Encodes a string to make it fit into one line.- Parameters:
str- the string to be encoded- Returns:
- the encoded string
- See Also:
-
decode
Decodes a string which was encoded byencode(String).- Parameters:
str- the string to be decoded- Returns:
- the decoded string
- See Also:
-