Java tutorial
//package com.java2s; import android.util.Log; public class Main { public static String printByteArrayAsInt(String caller, byte[] data) { String ret = ""; for (int i = 0; i < data.length; i++) { ret += Integer.toHexString((int) (data[i] & 0xFF)) + ","; Log.i(caller, "Byte " + i + " is " + Integer.toHexString((int) (data[i] & 0xFF))); } return ret; } }