static public void appendHexString ( StringBuilder buffer , int value ) { assertNotNull ( buffer ) ; int nibble = ( value & 0xF0000000 ) >>> 28 ; buffer . append ( HEX_TABLE [ nibble ] ) ; nibble = ( value & 0x0F000000 ) >>> 24 ; buffer . append ( HEX_TABLE [ nibble ] ) ; nibble = ( value & 0x00F00000 ) >>> 20 ; buffer . append ( HEX_TABLE [ nibble ] ) ; nibble = ( value & 0x000F0000 ) >>> 16 ; buffer . append ( HEX_TABLE [ nibble ] ) ; nibble = ( value & 0x0000F000 ) >>> 12 ; buffer . append ( HEX_TABLE [ nibble ] ) ; nibble = ( value & 0x00000F00 ) >>> 8 ; buffer . append ( HEX_TABLE [ nibble ] ) ; nibble = ( value & 0x000000F0 ) >>> 4 ; buffer . append ( HEX_TABLE [ nibble ] ) ; nibble = ( value & 0x0000000F ) ; buffer . append ( HEX_TABLE [ nibble ] ) ; }
Appends 8 characters to a StringBuilder with the int in a Big Endian hexidecimal format . For example a int 0xFFAA1234 will be appended as a String in format FFAA1234 . A int of value 0 will be appended as 00000000 .