Here you can find the source of newString(final byte[] bytes, final Charset charset)
private static String newString(final byte[] bytes, final Charset charset)
//package com.java2s; //License from project: Apache License import java.nio.charset.Charset; public class Main { private static String newString(final byte[] bytes, final Charset charset) { return bytes == null ? null : new String(bytes, charset); }//from w w w.j a v a 2 s.c o m }