Android UTF8 Encode stringFromUtf8ByteArray(byte[] data)

Here you can find the source of stringFromUtf8ByteArray(byte[] data)

Description

string From Utf Byte Array

License

Open Source License

Declaration

public static String stringFromUtf8ByteArray(byte[] data) 

Method Source Code

//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;
        }
    }
}

Related

  1. utf8encode(String str)
  2. isValidUTF8(byte[] input)
  3. string2BytesUTF8(String str)
  4. toUtf8Bytes(String data)
  5. toUtf8String(byte[] data)