I have method to covert character to haxa like
private static String convert(char str)
{
StringBuffer ostr = new StringBuffer();
String hex = Integer.toHexString(str & 0xFFFF);
for(int j=0; j<4-hex.length(); j++)
ostr.append("0");
ostr.append(hex.toUpperCase());
return (new String(ostr));
}
Its work fine for window but create problem for linux.
Can any one suggest me how to do same thing in linux ?
You may try, e.g.:
Check the documentation of
java.lang.Stringfor more details.Cheers!