Here you can find the source of convertStringToHexComma(String plain, boolean appendNullSigns)
public static String convertStringToHexComma(String plain, boolean appendNullSigns)
//package com.java2s; public class Main { public static String convertStringToHexComma(String plain, boolean appendNullSigns) { if (plain == null || plain.trim().length() == 0) return plain; StringBuffer strBuf = new StringBuffer(); for (int x = 0; x != plain.length(); x++) { if (x > 0) strBuf.append(","); strBuf.append(Integer.toHexString(plain.charAt(x))); if (appendNullSigns) strBuf.append(",00"); //this is needed, dunno why by the multi and expand string entries, but not for the binary }/* www . j ava 2 s. c om*/ return strBuf.toString(); } }