public static String toString(byte[] bytes, String charsetName) throws UnsupportedEncodingException {
        return charsetName == null ? new String(bytes) : new String(bytes, charsetName);
    }
Converts a <code>byte[]</code> to a String using the specified character encoding.

@param bytes
           the byte array to read from
@param charsetName
           the encoding to use, if null then use the platform default
@return a new String
@throws UnsupportedEncodingException
            If the named charset is not supported
@throws NullPointerException
            if the input is null
@since 3.1
android/android_framework/base/src/main/java/lang3/StringUtils.java