Utility.java
public static String toHex(byte[] buffer) {
        StringBuffer sb = new StringBuffer();
		for (byte b : buffer) {
			sb.append(String.format("%02x", b & 0xff));
        }
        
        return sb.toString();
    }
/**
     * Converts a byte array to a hexadecimal String representation.
     */
Converts a byte array to a hexadecimal String representation.
Converts a byte array to a hexadecimal String representation .
public static String toHex(byte[] buffer) {
        StringBuffer sb = new StringBuffer();
		for (byte b : buffer) {
			sb.append(String.format("%02x", b & 0xff));
        }
        return sb.toString();
    }
public static String toHex ( byte [ ] buffer ) { StringBuffer sb = new StringBuffer ( ) ; for ( byte b : buffer ) { sb . append ( String . format ( "%02x" , b & 0xff ) ) ; } return sb . toString ( ) ; }
Converts a byte array to a hexadecimal String representation.
Converts a byte array to a hexadecimal String representation .