Convert character value to hexa in java
<p>I have method to covert character to haxa like </p>

<pre><code>private static String convert(char str)
    {
        StringBuffer ostr = new StringBuffer();
        String hex = Integer.toHexString(str &amp; 0xFFFF);  
        for(int j=0; j&lt;4-hex.length(); j++) 
            ostr.append("0");
        ostr.append(hex.toUpperCase());

        return (new String(ostr));      

    }
</code></pre>

<p>Its work fine for window but create problem for linux.
Can any one suggest me how to do same thing in linux ?</p>
