Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { public static String getHexArray(byte[] arr) { StringBuilder sb = new StringBuilder(); for (byte c : arr) { sb.append(String.format("%02X ", c)); } return sb.toString(); } }