Java tutorial
//package com.java2s; import java.io.UnsupportedEncodingException; public class Main { public static String getAsciiString(final byte[] data) { if (data == null) { throw new IllegalArgumentException("Parameter may not be null"); } try { return new String(data, "US-ASCII"); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } }