public class Subnet extends Object
Constructor | Description |
---|---|
Subnet(InetAddress subnet,
int mask) |
Creates a subnet from CIDR notation.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(Object obj) |
|
boolean |
inSubnet(InetAddress address) |
Checks if the
InetAddress is within this subnet |
String |
toString() |
public Subnet(InetAddress subnet, int mask)
InetAddress
192.168.0.0 and the mask 24.subnet
- The InetAddress
of the subnetmask
- The maskpublic boolean inSubnet(InetAddress address)
InetAddress
is within this subnetaddress
- The InetAddress
to checkpublic String toString()
toString
in class Object
Object.toString()
Copyright © 2004–2018 Apache MINA Project. All rights reserved.