Here you can find the source of stringFromUtf8ByteArray(byte[] data)
public static String stringFromUtf8ByteArray(byte[] data)
//package com.java2s; public class Main { public static String stringFromUtf8ByteArray(byte[] data) { try {//from w w w. j a v a 2s .c o m return new String(data, "UTF-8"); } catch (Exception e) { return null; } } }