Here you can find the source of ConvertUTF8(byte[] buffer)
public static java.lang.String ConvertUTF8(byte[] buffer)
//package com.java2s; //License from project: Open Source License public class Main { public static java.lang.String ConvertUTF8(byte[] buffer) { return new String(buffer, java.nio.charset.StandardCharsets.UTF_8); }//w w w .j ava 2s. c om public static java.lang.String ConvertUTF8( java.util.ArrayList<Byte> buffer) { byte[] buf = new byte[(int) buffer.size()]; for (int i = 0; i < buf.length; i++) { buf[i] = buffer.get(i); } return new String(buf, java.nio.charset.StandardCharsets.UTF_8); } }