org.wymiwyg.commons.util
Class Util

java.lang.Object
  extended by org.wymiwyg.commons.util.Util

public class Util
extends Object

Author:
reto

Constructor Summary
Util()
           
 
Method Summary
static String bytes2HexString(byte[] bytes)
          Converts an array of bytes to a string of two digits hex-representations
static byte[] createRandomBytes(int length)
           
static String createRandomString(int length)
           
static String createURN5()
           
static String formatDate(Date date)
           
static String replaceSlashWithHyphen(String origin)
          replaces slashes with hyphens and removes padding=
static String sha1(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

createRandomString

public static String createRandomString(int length)

createURN5

public static String createURN5()

replaceSlashWithHyphen

public static String replaceSlashWithHyphen(String origin)
replaces slashes with hyphens and removes padding=

Parameters:
origin -
Returns:

createRandomBytes

public static byte[] createRandomBytes(int length)

formatDate

public static String formatDate(Date date)
Parameters:
date -
Returns:

sha1

public static String sha1(String s)
Parameters:
password -
Returns:

bytes2HexString

public static String bytes2HexString(byte[] bytes)
Converts an array of bytes to a string of two digits hex-representations

Parameters:
bytes -
Returns:


Copyright © 2011. All Rights Reserved.