Package org.jboss.ejb._private
Class NetworkUtil
java.lang.Object
org.jboss.ejb._private.NetworkUtil
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanbelongsToNetwork(InetAddress address, InetAddress networkAddress, int networkMask) Returns true if the passedaddressis part of the network represented by the passednetworkAddressandnetworkMask.static StringformatPossibleIpv6Address(String address)
-
Constructor Details
-
NetworkUtil
public NetworkUtil()
-
-
Method Details
-
belongsToNetwork
public static boolean belongsToNetwork(InetAddress address, InetAddress networkAddress, int networkMask) Returns true if the passedaddressis part of the network represented by the passednetworkAddressandnetworkMask. Else returns false- Parameters:
address- The address being checkednetworkAddress- The network addressnetworkMask- The network mask bits- Returns:
-
formatPossibleIpv6Address
-