Class NetworkUtil

java.lang.Object
org.jboss.ejb._private.NetworkUtil

public class NetworkUtil extends Object
Tests for the network utility class, used to determine if an internet address belongs to a particular network, where the network is defined by a network address and netmask.
Author:
Jaikiran Pai
  • Constructor Details

    • NetworkUtil

      public NetworkUtil()
  • Method Details

    • 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)