public static String toHex(final byte[] value){
  return (value != null) ? new String(Hex.encodeHex(value,false)) : null;
}

public static String toHex ( final byte [ ] value ) { return ( value != null ) ? new String ( Hex . encodeHex ( value , false ) ) : null ; }
converts an array of bytes into a string representing the hexadecimal values of each byte in order . the returned string will be double the length of the passed array , as it takes two characters to represent any given byte . if the input array is null then null is returned . the obtained string is converted to uppercase .
