Here you can find the source of toAsciiString(byte[] output)
public static String toAsciiString(byte[] output)
//package com.java2s; /**/* www. jav a2s .c om*/ * Source obtained from crypto-gwt. Apache 2 License. * https://code.google.com/p/crypto-gwt/source/browse/crypto-gwt/src/main/java/com/googlecode/ * cryptogwt/util/ByteArrayUtils.java */ public class Main { public static String toAsciiString(byte[] output) { char[] chars = new char[output.length]; for (int i = 0; i < output.length; i++) { chars[i] = (char) output[i]; } return new String(chars); } }