Here you can find the source of long2dotted(long address)
public static String long2dotted(long address)
//package com.java2s; //License from project: Apache License public class Main { public static String long2dotted(long address) { StringBuilder sb = new StringBuilder(); for (int i = 0, shift = 24; i < 4; i++, shift -= 8) { long value = (address >> shift) & 0xff; sb.append(value);/* ww w. ja v a2 s . c om*/ if (i != 3) { sb.append('.'); } } return sb.toString(); } }