Here you can find the source of intToIpV4(int i)
public static String intToIpV4(int i)
//package com.java2s; /*/*from w ww. j av a2 s.c o m*/ Copyright (C) 2011 NTT DATA Corporation This program is free software; you can redistribute it and/or Modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ public class Main { public static String intToIpV4(int i) { int b1 = (i >> 24) & 0xff; int b2 = (i >> 16) & 0xff; int b3 = (i >> 8) & 0xff; int b4 = i & 0xff; return b1 + "." + b2 + "." + b3 + "." + b4; } }