Here you can find the source of asciiToHex(String asciiValue)
public static String asciiToHex(String asciiValue)
//package com.java2s; public class Main { public static String asciiToHex(String asciiValue) { char[] chars = asciiValue.toCharArray(); StringBuffer hex = new StringBuffer(); for (int i = 0; i < chars.length; i++) { hex.append(Integer.toHexString(chars[i])); }/*from w w w. j a v a 2 s . co m*/ return hex.toString(); } }