Here you can find the source of toAscii(String hexStr)
public static String toAscii(String hexStr)
//package com.java2s; /*/*from w w w . j a v a2 s .c o m*/ * Author : Ardika Rommy Sanjaya * Website : http://ardikars.com * Contact : contact@ardikars.com * License : Lesser GNU Public License Version 3 */ public class Main { public static String toAscii(String hexStr) { StringBuilder sb = new StringBuilder(""); for (int i = 0; i < hexStr.length(); i += 2) { String str = hexStr.substring(i, i + 2); sb.append((char) Integer.parseInt(str, 16)); } return sb.toString(); } }