net.sourceforge.jwap.util
Class Utils

java.lang.Object
  |
  +--net.sourceforge.jwap.util.Utils

public class Utils
extends java.lang.Object

This class contains various static utility methods.

Author:
Michel Marti

Constructor Summary
Utils()
           
 
Method Summary
static java.lang.String hexDump(byte[] bytes)
          Construct a String containing a hex-dump of a byte array
static java.lang.String hexDump(java.lang.String label, byte[] bytes)
          Construct a String containing a hex-dump of a byte array
static java.lang.String hexString(int i)
          Returns a string representation of the integer argument as an unsigned integer in base 16.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

hexDump

public static java.lang.String hexDump(byte[] bytes)
Construct a String containing a hex-dump of a byte array
Parameters:
bytes - the data to dump
Returns:
a string containing the hexdump

hexDump

public static java.lang.String hexDump(java.lang.String label,
                                       byte[] bytes)
Construct a String containing a hex-dump of a byte array
Parameters:
label - the label of the hexdump or null
bytes - the data to dump
Returns:
a string containing the hexdump

hexString

public static java.lang.String hexString(int i)
Returns a string representation of the integer argument as an unsigned integer in base 16. The string is prefixed with "0x"
Parameters:
i - an integer to be converted to a string.