Here you can find the source of bytes2String(byte[] bytes)
private static String bytes2String(byte[] bytes)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); you may public class Main { private static String bytes2String(byte[] bytes) { StringBuffer stringBuffer = new StringBuffer(); for (int i = 0; i < bytes.length; i++) { stringBuffer.append((char) bytes[i]); }//from w w w.j av a 2 s .c om return stringBuffer.toString(); } }