class ByteArrayUtil {

  public static String toHex(byte[] byteArray) {
    if (byteArray == null) {
      return "";
    }
    StringBuilder hexStringBuilder = new StringBuilder();
    for (int i = 0; i < byteArray.length; i++) {
      hexStringBuilder.append(byteToHex[byteArray[i] & 0xFF]);
    }
    return hexStringBuilder.toString();
  }

  private  ByteArrayUtil();

}