kristal.client
Class KristalEncoding

java.lang.Object
  extended bykristal.client.KristalEncoding

public class KristalEncoding
extends java.lang.Object

This Class implements a encoding/decoding module.

Since:
JDK 1.1

Constructor Summary
KristalEncoding()
           
 
Method Summary
static int get_utf8_size(java.lang.String str)
          Pre-calculation of string message size in UTF-8
static byte[] UNICODE_UTF8(java.lang.String str)
          Convert Java native unicode to UTF-8
static java.lang.String UTF8_UNICODE(byte[] str)
          Convert UTF-8 message to Java nativer unicode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KristalEncoding

public KristalEncoding()
Method Detail

get_utf8_size

public static int get_utf8_size(java.lang.String str)
Pre-calculation of string message size in UTF-8

Parameters:
str - - string to be encoded in utf-8
Returns:
Size of the encoded string in utf-8

UNICODE_UTF8

public static byte[] UNICODE_UTF8(java.lang.String str)
Convert Java native unicode to UTF-8

Parameters:
str - Input message has String class

UTF8_UNICODE

public static java.lang.String UTF8_UNICODE(byte[] str)
Convert UTF-8 message to Java nativer unicode

Parameters:
str - String class
Returns:
Message string