Here you can find the source of bytes2IPV4(byte[] addr, int offset)
public static final String bytes2IPV4(byte[] addr, int offset)
//package com.java2s; //License from project: Open Source License public class Main { public static final String bytes2IPV4(byte[] addr, int offset) { String hostName = "" + (addr[offset] & 0xFF); for (int i = offset + 1; i < offset + 4; i++) { hostName += "." + (addr[i] & 0xFF); }/*from w w w . j a v a 2 s . co m*/ return hostName; } }