Android examples for java.lang:Byte Array
convert Byte Array To String in UTF-8
import android.util.Log; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import java.util.Locale; public class Main{ public static String convertByteArrayToString(byte[] data) { try {//w w w .j ava 2 s.co m return new String(data, "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return null; } }