code: public static String toHexString(byte[] raw) {
          byte[] hex = new byte[2 * raw.length];
          int index = 0;
          for (byte b : raw) {
              int v = b & 0x00ff;
              hex[index++] = HEX_CHARS[v >>> 4];
              hex[index++] = HEX_CHARS[v & 0xf];
          }
          try {
              return new String(hex, "ASCII");
          } catch (java.io.UnsupportedEncodingException x) {
              throw new RuntimeException(x.getMessage(), x);
          }
      }
docs: Converts an array of bytes into a hexadecimal representation.
  
  This implementation is significantly faster than DatatypeConverter.printHexBinary().
  
  @param raw the byte array to convert to a hexadecimal String
  @return a hexadecimal String representing the bytes