Here you can find the source of asString(byte[] bytes)
private static String asString(byte[] bytes)
//package com.java2s; //License from project: Open Source License public class Main { private static String asString(byte[] bytes) { if (bytes != null) { return new String(bytes); } else {//ww w .ja va2 s . c o m return ""; } } }