Here you can find the source of convertHexDigitAsInt(char c)
public static int convertHexDigitAsInt(char c)
//package com.java2s; /*//from w w w. j a v a 2s . com * JLib - Publicitas Java library v1.2.0. * * Copyright (c) 2005, 2006, 2007, 2008, 2009 Publicitas SA. * Licensed under LGPL (LGPL-LICENSE.txt) license. */ public class Main { public static int convertHexDigitAsInt(char c) { if (c >= '0' && c <= '9') return c - '0'; if (c >= 'A' && c <= 'F') return c - 'A' + 10; if (c >= 'a' && c <= 'f') return c - 'a' + 10; return 0; } }