org.objectweb.carol.cmi
Class InetMask

java.lang.Object
  extended byorg.objectweb.carol.cmi.InetMask

public class InetMask
extends java.lang.Object

Author:
Simon Nieuviarts

Constructor Summary
InetMask(java.lang.String textual)
          Generate an IP mask from its textual representation.
 
Method Summary
 java.util.LinkedList filterLocal()
          Use JDK 1.4 methods.
 boolean match(java.net.InetAddress a)
          Test if an IP addr matches with the mask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InetMask

public InetMask(java.lang.String textual)
         throws java.net.UnknownHostException
Generate an IP mask from its textual representation. The special case of a single address is taken into account.

Parameters:
textual - textual representation of the IP mask
Throws:
java.net.UnknownHostException - if exception
Method Detail

match

public boolean match(java.net.InetAddress a)
Test if an IP addr matches with the mask

Parameters:
a - ip addr
Returns:
true if matches

filterLocal

public java.util.LinkedList filterLocal()
Use JDK 1.4 methods.

Returns:
List of local addresses (java.net.InetAddress) matching this InetMask.