Android Byte Array to String Convert getString(byte[] bytes, String charsetName)

Here you can find the source of getString(byte[] bytes, String charsetName)

Description

get String

License

Open Source License

Declaration

public static String getString(byte[] bytes, String charsetName) 

Method Source Code

//package com.java2s;

import java.nio.charset.Charset;

public class Main {
    public static String getString(byte[] bytes, String charsetName) {
        return new String(bytes, Charset.forName(charsetName));
    }//from ww w  .  j av  a 2  s.  co  m

    public static String getString(byte[] bytes) {
        return getString(bytes, "GBK");
    }
}

Related

  1. bytes2String(byte[] data)
  2. bytes2String(byte[] data, String type)
  3. bytes2StringPtr(byte[] data, String type)
  4. getString(byte[] bb)
  5. getString(byte[] bytes)
  6. getString(byte[] fromBytes, int offset, int length)
  7. getString(byte[] originalByte, int start, int length)
  8. getString(byte[] value)
  9. getStringByByteArray(byte[] b)