Added ipv4ToString method
This commit is contained in:
parent
d9e7b4b0f7
commit
4eaf81c053
@ -237,6 +237,15 @@ class NetworkUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the String representation of the given IPv4 address
|
||||
*/
|
||||
public static
|
||||
String ipv4ToString(byte[] address) {
|
||||
return (address[0] & 0xFF) + "." + (address[1] & 0xFF) + "." + (address[2] & 0xFF) + "." + (address[3] & 0xFF);
|
||||
}
|
||||
|
||||
|
||||
private
|
||||
NetworkUtil() {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user