Here you can find the source of dumpByteArray(byte[] buffer)
public static String dumpByteArray(byte[] buffer)
//package com.java2s; //License from project: Open Source License public class Main { public static String dumpByteArray(byte[] buffer) { StringBuffer sb = new StringBuffer(); sb.append("{ "); int len = buffer.length; for (int i = 0; i < len; i++) { if (i > 0) sb.append(", "); sb.append(buffer[i] & 0xff); }/*from www. j a v a2 s. com*/ sb.append(" }"); return sb.toString(); } }