public static String formatAddress ( int address ) { int b1 = ( address >>> 24 ) & 0xff ; int b2 = ( address >>> 16 ) & 0xff ; int b3 = ( address >>> 8 ) & 0xff ; int b4 = address & 0xff ; return "" + b1 + ' ' + b2 + ' ' + b3 + ' ' + b4 ; }
Util method to create a string representation of a 32 bit integer representing an IPv4 address .