util
Class Util

java.lang.Object
  extended by util.Util

public class Util
extends java.lang.Object


Constructor Summary
Util()
           
 
Method Summary
static java.lang.String escapeCDATA(java.lang.String _str)
          Escapes the given string, for xml CDATA.
static java.lang.String escapeGtwAddress(java.lang.String jid)
           
static java.lang.String formatGtwAddress(java.lang.String jid)
           
static byte[] imageToByte(javax.microedition.lcdui.Image img, int width, int height)
           
static java.lang.String sha1(byte[] in)
          Returns a SHA1 digest of the given array of bytes, in hex values lowercase.
static java.lang.String sha1(java.lang.String _str)
          Returns a SHA1 digest of the given string, in hex values lowercase.
static java.lang.String unescapeCDATA(java.lang.String _str)
          Unescapes the given string, from an xml CDATA.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

sha1

public static java.lang.String sha1(java.lang.String _str)
Returns a SHA1 digest of the given string, in hex values lowercase.

Parameters:
_str -

sha1

public static java.lang.String sha1(byte[] in)
Returns a SHA1 digest of the given array of bytes, in hex values lowercase.

Parameters:
_str -

escapeCDATA

public static java.lang.String escapeCDATA(java.lang.String _str)
Escapes the given string, for xml CDATA.


unescapeCDATA

public static java.lang.String unescapeCDATA(java.lang.String _str)
Unescapes the given string, from an xml CDATA.


formatGtwAddress

public static java.lang.String formatGtwAddress(java.lang.String jid)

escapeGtwAddress

public static java.lang.String escapeGtwAddress(java.lang.String jid)

imageToByte

public static byte[] imageToByte(javax.microedition.lcdui.Image img,
                                 int width,
                                 int height)