Here you can find the source of toBytesString(byte[] bytes)
public static String toBytesString(byte[] bytes)
//package com.java2s; //License from project: Apache License public class Main { public static String toBytesString(byte[] bytes) { if (bytes == null) { return null; }/*from ww w .ja v a 2s .c o m*/ StringBuilder buffer = new StringBuilder(256); for (byte b : bytes) { buffer.append((char) b); } return buffer.toString(); } }