Here you can find the source of bytetoString(byte[] b)
public static String bytetoString(byte[] b)
//package com.java2s; import java.io.UnsupportedEncodingException; public class Main { public final static String DEFAULT_CHARSET = "UTF-8"; public static String bytetoString(byte[] b) { try {//from w w w . ja v a 2 s . co m return new String(b, DEFAULT_CHARSET); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } }