Java Hex Convert To fromHexShort(char a)

Here you can find the source of fromHexShort(char a)

Description

from Hex Short

License

Open Source License

Declaration

private static int fromHexShort(char a) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static int fromHexShort(char a) {
        if (a >= '0' && a <= '9') {
            return a - '0';
        }/* www.j ava2s .  c o m*/
        if (a >= 'a' && a <= 'f') {
            return 10 + (a - 'a');
        }

        throw new RuntimeException();
    }
}

Related

  1. fromHexDigest(String hexDigest)
  2. fromHexDigit(final char c)
  3. fromHexDigit(int c)
  4. fromHexNibble(char n)
  5. fromHexNibble(final char n)
  6. fromHexStr(final String data)
  7. fromHexString(byte abyte0[], int i)
  8. fromHexString(final String hexaString)
  9. fromHexString(final String hexString)