[java] Converting A String To Hexadecimal In Java

new BigInteger(1, myString.getBytes(/*YOUR_CHARSET?*/)).toString(16)