Class NetworkUtil


  • public class NetworkUtil
    extends Object
    Author:
    Jaikiran Pai
    • Constructor Detail

      • NetworkUtil

        public NetworkUtil()
    • Method Detail

      • belongsToNetwork

        public static boolean belongsToNetwork​(InetAddress address,
                                               InetAddress networkAddress,
                                               int networkMask)
        Returns true if the passed address is part of the network represented by the passed networkAddress and networkMask. Else returns false
        Parameters:
        address - The address being checked
        networkAddress - The network address
        networkMask - The network mask bits
        Returns:
      • formatPossibleIpv6Address

        public static String formatPossibleIpv6Address​(String address)