org.apache.openejb.util
Class HexConverter

java.lang.Object
  extended by org.apache.openejb.util.HexConverter

public class HexConverter
extends Object


Method Summary
static String bytesToHex(byte[] bytes)
          Converts a byte array to its hexadecimal string representation, ie.
static byte[] hexToBytes(String hexString)
          Converts a hexadecimal formatted string into a corresponding byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

bytesToHex

public static String bytesToHex(byte[] bytes)
Converts a byte array to its hexadecimal string representation, ie. new byte[] { 127, 0, 10 } returns "7F000A".

Parameters:
bytes - an array of bytes
Returns:
hexadecimal string representation of the first argument

hexToBytes

public static byte[] hexToBytes(String hexString)
Converts a hexadecimal formatted string into a corresponding byte array.

Parameters:
hexString - a hexadecimal representation of a byte array
Returns:
an array of bytes created from the input


Copyright © 1999-2013 The Apache OpenEJB development community. All Rights Reserved.