net.larsan.urd.util
Class HexUtils

java.lang.Object
  |
  +--net.larsan.urd.util.HexUtils

public class HexUtils
extends java.lang.Object

Static methods for HEX / byte conversions.

Version:
Alpha-0.1 / 2002-10-06 21:37
Author:
Lars J. Nilsson

Method Summary
static byte[] parseString(java.lang.String hex)
          Parse a hex string into a byte array.
static java.lang.String toString(byte[] bytes)
          Convert a byte array to a hex string.
static java.lang.String toString(byte[] bytes, int off, int len)
          Convert parts of a byte array to a hex string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toString

public static java.lang.String toString(byte[] bytes,
                                        int off,
                                        int len)
Convert parts of a byte array to a hex string.

Parameters:
bytes - Byte array to convert from
off - Byte array offest
len - Number of bytes to convert
Returns:
A string of hex characters

toString

public static java.lang.String toString(byte[] bytes)
Convert a byte array to a hex string.

Parameters:
bytes - Byte array to convert
Returns:
A string of hex characters

parseString

public static byte[] parseString(java.lang.String hex)
Parse a hex string into a byte array.

Parameters:
hex - Hex string to parse
Returns:
A byte array