Here you can find the source of asciiToHexStr(String src)
public static String asciiToHexStr(String src)
//package com.java2s; //License from project: Apache License public class Main { public static String asciiToHexStr(String src) { StringBuilder sBuilder = new StringBuilder(); for (int i = 0; i < src.length(); i++) sBuilder.append(String.format("%02X", Integer.valueOf(src.charAt(i)))); return sBuilder.toString(); }/*from w w w .ja v a2 s . co m*/ }