Android examples for java.net:IP Address
Convert int To Ip address and return string
public class Main{ public static String intToIp(int ip) {//from w w w.j a va2 s.c om return (ip & 0xFF) + "." + ((ip >> 8) & 0xFF) + "." + ((ip >> 16) & 0xFF) + "." + ((ip >> 24) & 0xFF); } }