Here you can find the source of toHex(int value)
Parameter | Description |
---|---|
value | an integer |
private static char toHex(int value)
//package com.java2s; // are made available under the terms of the Eclipse Public License v1.0 public class Main { private static final char[] HEX_DIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; /**// ww w. j av a 2 s .co m * Returns the hexidecimal character representation for an integer. * * @param value * an integer * @return the hexidecimal representation */ private static char toHex(int value) { return HEX_DIGITS[(value & 0xF)]; } }