public static String byteArrayToHexString(final byte in[]){
  final String pseudo[]={"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"};
  if (in == null || in.length <= 0) {
    return "";
  }
  final StringBuilder out=new StringBuilder(in.length * 2);
  for (  final byte b : in) {
    byte ch=(byte)(b & 0xF0);
    ch=(byte)(ch >>> 4);
    ch=(byte)(ch & 0x0F);
    out.append(pseudo[(int)ch]);
    ch=(byte)(b & 0x0F);
    out.append(pseudo[(int)ch]);
  }
  return out.toString();
}

public static String byteArrayToHexString ( final byte in [ ] ) { final String pseudo [ ] = { "0" , "1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" , "A" , "B" , "C" , "D" , "E" , "F" } ; if ( in == null || in . length <= 0 ) { return "" ; } final StringBuilder out = new StringBuilder ( in . length * 2 ) ; for ( final byte b : in ) { byte ch = ( byte ) ( b & 0xF0 ) ; ch = ( byte ) ( ch > > > 4 ) ; ch = ( byte ) ( ch & 0x0F ) ; out . append ( pseudo [ ( int ) ch ] ) ; ch = ( byte ) ( b & 0x0F ) ; out . append ( pseudo [ ( int ) ch ] ) ; } return out . toString ( ) ; }
convert a byte [ ] array to readable string format . this makes the " hex " readable
