hi t@c,
hope this could give you an idea:
private String asciiToHex(String ascii){
StringBuilder hex = new StringBuilder();
for (int i=0; i < ascii.length(); i++) {
hex.append(Integer.toHexString(ascii.charAt(i)));
}
System.out.println("Value of ascii " + ascii + ": " + hex.toString());
return hex.toString();
}
the use of StringBuilder should be self-explanatory.
if you should invoke this method from your simple application, passing
parameter with value "ABC" should give you the result of "414243".
hth.