Java tutorial
//package com.java2s; public class Main { public static String getASCII(String value) { StringBuffer sbu = new StringBuffer(); char[] chars = value.toCharArray(); for (int i = 0; i < chars.length; i++) { if (i != chars.length - 1) { sbu.append((int) chars[i]); } } return sbu.toString(); } }