Java tutorial
//package com.java2s; public class Main { public static void logBytes(byte[] ucPtr) { String s; final StringBuffer sb = new StringBuffer(); for (int i = 0; i < ucPtr.length; ++i) { if (0 == i) { s = ""; } else { s = ", "; } s += String.valueOf(ucPtr[i]); sb.append(s); } // LogUtil.amengLog().d("++++ " + "data=" + sb); } }