Here you can find the source of getString(byte[] bytes)
public static String getString(byte[] bytes)
//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 .ja v a 2 s .c o m*/ public static String getString(byte[] bytes) { return getString(bytes, "GBK"); } }