static public String bb2hex(byte[] bb){
  StringBuilder result=new StringBuilder();
  for (int i=0; i < bb.length; i++) {
    result.append(String.format("%02X ",bb[i]));
  }
  return result.toString();
}

static public String bb2hex ( byte [ ] bb ) { StringBuilder result = new StringBuilder ( ) ; for ( int i = 0 ; i < bb . length ; i ++ ) { result . append ( String . format ( "%02X " , bb [ i ] ) ) ; } return result . toString ( ) ; }
converts a byte array to a hexadecimal string representation
