Java Utililty Methods Byte Array to IP Address

List of utility methods to do Byte Array to IP Address

Description

The list of methods to do Byte Array to IP Address are organized into topic(s).

Method

StringbyteToIp(byte[] ip)
byte To Ip
String ips = "";
for (byte i : ip) {
    int i2 = i & 0xFF;
    ips += i2 + ".";
if (ips.length() > 0) {
    ips = ips.substring(0, ips.length() - 1);
return ips;
StringbyteToIp(byte[] value)
byte To Ip
StringBuffer strb = new StringBuffer();
strb.append(value[0] & 0xFF).append(".");
strb.append(value[1] & 0xFF).append(".");
strb.append(value[2] & 0xFF).append(".");
strb.append(value[3] & 0xFF);
return strb.toString();
StringByteToIp(int[] ips)
Byte To Ip
StringBuilder sb = new StringBuilder();
sb.append(ips[0]);
sb.append(".");
sb.append(ips[1]);
sb.append(".");
sb.append(ips[2]);
sb.append(".");
sb.append(ips[3]);
...