public static String asciiToHexString(final String asciiString){
  final StringBuffer sb=new StringBuffer();
  for (  final byte b : asciiString.getBytes()) {
    sb.append(byteToHexString(b));
  }
  return sb.toString();
}

public static String asciiToHexString ( final String asciiString ) { final StringBuffer sb = new StringBuffer ( ) ; for ( final byte b : asciiString . getBytes ( ) ) { sb . append ( byteToHexString ( b ) ) ; } return sb . toString ( ) ; }
converts an ascii string into a hex string . example : aaa = > 414141
