Here you can find the source of fromUTF8(byte[] bytes)
public static String fromUTF8(byte[] bytes)
//package com.java2s; //License from project: Open Source License import java.nio.charset.Charset; public class Main { public static final Charset UTF_8 = Charset.forName("UTF-8"); /**//from w w w .j a v a2 s . com * Decodes UTF-8 bytes to String. * * @see #fromUTF8(byte[], int, int) */ public static String fromUTF8(byte[] bytes) { return fromUTF8(bytes, 0, bytes.length); } /** * Decodes UTF-8 bytes to String. */ public static String fromUTF8(byte[] bytes, int off, int len) { return new String(bytes, off, len, UTF_8); } }