All Packages Class Hierarchy This Package Previous Next Index
Class benno.net.IPAddress
java.lang.Object
|
+----benno.net.IPAddress
- public class IPAddress
- extends Object
This class reprents an IP address (and netmask if desired)
in a form more suitable for manipulation
than java.net.InetAddress (or whatever it is called).
-
IPAddress(String)
- Takes an input of the form "192.168.201.16" and parses it.
-
contains(IPAddress)
- Returns true if this object, presumably representing a network rather
than a single IP address, contains the candidate IPAddress.
-
equals(Object)
-
-
toString()
-
IPAddress
public IPAddress(String s)
- Takes an input of the form "192.168.201.16" and parses it.
Optionally, a suffix may be specified to set the netmask: for example
"192.168.201.0/24"
toString
public String toString()
- Overrides:
- toString in class Object
contains
public boolean contains(IPAddress candidate)
- Returns true if this object, presumably representing a network rather
than a single IP address, contains the candidate IPAddress. i.e The
candidate prefix length is equal or longer, and the prefix is the same.
equals
public boolean equals(Object o)
- Overrides:
- equals in class Object
All Packages Class Hierarchy This Package Previous Next Index