Hex { public static String uNibble(int v) { char[] result = new char[1]; result[0] = Character.forDigit(v & 0x0f, 16); return new String(result); } private  Hex(); static String u8(long v); static String u4(int v); static String u3(int v); static String u2(int v); static String u2or4(int v); static String u1(int v); static String uNibble(int v); static String s8(long v); static String s4(int v); static String s2(int v); static String s1(int v); static String dump(byte[] arr, int offset, int length,
                              int outOffset, int bpl, int addressLength);  }
@Test public void testUNibble() { Assert.assertEquals("0", Hex.uNibble(0)); Assert.assertEquals("1", Hex.uNibble(1)); Assert.assertEquals("f", Hex.uNibble(999999999)); Assert.assertEquals("2", Hex.uNibble(1234567890)); }