Class NetworkUtils
java.lang.Object
org.eblocker.server.common.network.NetworkUtils
IPv4 network utilities
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetIPv4NetworkAddress(String ipAddress, String networkMask) static StringgetIPv4NetworkMask(int prefixLength) static intgetPrefixLength(String ipv4NetworkMask) static booleanisBeforeAddress(String ip1, String ip2) Check whether ip1 is before/smaller than ip2 (precondition/required: both IPs are in the same network)static StringreplaceLastByte(String ipv4Address, byte b)
-
Field Details
-
privateClassA
- See Also:
-
privateClassB
- See Also:
-
privateClassC
- See Also:
-
linkLocal
- See Also:
-
-
Method Details
-
getIPv4NetworkMask
-
getPrefixLength
-
getIPv4NetworkAddress
-
replaceLastByte
-
isBeforeAddress
Check whether ip1 is before/smaller than ip2 (precondition/required: both IPs are in the same network)- Parameters:
ip1-ip2-- Returns:
-