Java tutorial
//package com.java2s; //License from project: Apache License public class Main { public static String bytesToString(byte[] bytes) { StringBuilder sb = new StringBuilder(bytes.length); for (int i = 0; i < bytes.length; i++) { sb.append(String.valueOf(bytes[i])).append(" "); } return sb.toString(); } }