Android Utililty Methods String to Hex String Convert

List of utility methods to do String to Hex String Convert

Description

The list of methods to do String to Hex String Convert are organized into topic(s).

Method

Stringstr2HexStrExt(String str)
str Hex Str Ext
char[] chars = "0123456789ABCDEF".toCharArray();
StringBuilder sb = new StringBuilder("");
byte[] bs = str.getBytes();
int bit;
for (int i = 0; i < bs.length; i++) {
    bit = (bs[i] & 0x0f0) >> 4;
    sb.append(chars[bit]);
    bit = bs[i] & 0x0f;
...