Java tutorial
//package com.java2s; public class Main { public static String getByteArray(byte[] data) { final StringBuffer sb = new StringBuffer(); for (int i = 0; i < data.length; i++) { sb.append(data[i] + ","); } return sb.toString().substring(0, sb.length() - 1); } }