Here you can find the source of asciiString(byte[] bytes, int from, int count)
public static String asciiString(byte[] bytes, int from, int count)
//package com.java2s; //License from project: Open Source License public class Main { public static String asciiString(byte[] bytes, int from, int count) { char value[] = new char[count]; for (int i = 0; i < count; ++i) value[i] = (char) (bytes[i + from] & 0xff); return new String(value); }/*from ww w . j a v a 2 s.co m*/ public static String asciiString(byte[] bytes) { return asciiString(bytes, 0, bytes.length); } }