Package org.apache.mina.filter.firewall
Class Subnet
- java.lang.Object
-
- org.apache.mina.filter.firewall.Subnet
-
public class Subnet extends java.lang.ObjectA IP subnet using the CIDR notation. Currently, only IP version 4 address are supported.- Author:
- Apache MINA Project
-
-
Constructor Summary
Constructors Constructor Description Subnet(java.net.InetAddress subnet, int mask)Creates a subnet from CIDR notation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)booleaninSubnet(java.net.InetAddress address)Checks if theInetAddressis within this subnetjava.lang.StringtoString()
-
-
-
Method Detail
-
inSubnet
public boolean inSubnet(java.net.InetAddress address)
Checks if theInetAddressis within this subnet- Parameters:
address- TheInetAddressto check- Returns:
- True if the address is within this subnet, false otherwise
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-