Here you can find the source of bytesToStringAscii(byte[] bytes)
public static String bytesToStringAscii(byte[] bytes)
//package com.java2s; //License from project: Apache License public class Main { public static String bytesToStringAscii(byte[] bytes) { char[] buffer = new char[bytes.length]; for (int i = 0; i < buffer.length; i++) { buffer[i] = (char) bytes[i]; }//from www . j av a 2s . c o m return new String(buffer); } }