public static String u2(int v) {
        char[] result = new char[4];
        for (int i = 0; i < 4; i++) {
            result[3 - i] = Character.forDigit(v & 0x0f, 16);
            v >>= 4;
        }

        return new String(result);
    }
@Test
    public void testU2() {
        Assert.assertEquals("0000", Hex.u2(0));
        Assert.assertEquals("04d2", Hex.u2(1234));
        Assert.assertEquals("02d2", Hex.u2(1234567890));
    }