Here you can find the source of toHexString(String str)
public static String[] toHexString(String str)
//package com.java2s; //License from project: Apache License public class Main { public static String[] toHexString(String str) { char[] chars = str.toCharArray(); String[] result = new String[chars.length]; for (int i = 0; i < chars.length; i++) { result[i] = Integer.toHexString((int) chars[i]); }/*w ww .j a va 2 s . c om*/ return result; } }