Here you can find the source of byteToString(byte[] bytearray)
public static String byteToString(byte[] bytearray)
//package com.java2s; public class Main { public static String byteToString(byte[] bytearray) { String result = ""; char temp; int length = bytearray.length; for (int i = 0; i < length; i++) { temp = (char) bytearray[i]; result += temp;//from www. j a v a2 s .co m } return result; } }