Here you can find the source of arrayToString(final byte[] array)
private static String arrayToString(final byte[] array)
//package com.java2s; import java.io.UnsupportedEncodingException; public class Main { public static final String ASCII_CHARSET = "US-ASCII"; private static String arrayToString(final byte[] array) { try {/* w ww . ja va2 s. co m*/ return new String(array, ASCII_CHARSET); } catch (UnsupportedEncodingException e) { return null; } } }