Here you can find the source of makeInt(String hex)
public static int makeInt(String hex)
//package com.java2s; public class Main { public static int makeInt(String hex) { int ret = 0; String[] hexChars = new String[16]; for (int i = 0; i < 10; i++) { hexChars[i] = String.valueOf(i); }/*www .j av a 2 s . c om*/ hexChars[10] = "A"; hexChars[11] = "B"; hexChars[12] = "C"; hexChars[13] = "D"; hexChars[14] = "E"; hexChars[15] = "F"; int j; int k = 1; int l = hex.length() - 1; int m = hex.length() - 1; for (int i = 0; i < hex.length(); i++) { l = m - i; for (j = 0; j < hexChars.length; j++) { if (String.valueOf(hex.charAt(l)).equals(hexChars[j])) { break; } } ret += k * j; k *= 16; } return ret; } }