Here you can find the source of toHexChar(int nibble)
Parameter | Description |
---|---|
nibble | the nibble to convert. |
public static char toHexChar(int nibble)
//package com.java2s; public class Main { /** A table of hex digits */ public static final char[] hexDigit = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; /**/*from w w w . ja va 2 s .c o m*/ * Convert a nibble to a hex character * * @param nibble * the nibble to convert. */ public static char toHexChar(int nibble) { return hexDigit[(nibble & 0xF)]; } }