java.net.NetworkInterface
| Modifier and Type | Field and Description |
|---|---|
| private InetAddress | |
| private Inet4Address | |
| private short |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the objects are the same;
false otherwise.the object to compare against. obj)Overrides java. Compares this object against the specified object. |
| public InetAddress | |
| public InetAddress | Returns: theInetAddress representing the broadcast
address or null if there is no broadcast address.Returns an |
| public short | Returns: ashort representing the prefix length for the
subnet of that address.Returns the network prefix length for this address. |
| public int | Returns: a hash code value for this Interface address.Overrides java. Returns a hashcode for this Interface address. |
| public String | Returns: a string representation of this Interface address.Overrides java. Converts this Interface address to a |
| address | back to summary |
|---|---|
| private InetAddress address | |
| broadcast | back to summary |
|---|---|
| private Inet4Address broadcast | |
| maskLength | back to summary |
|---|---|
| private short maskLength | |
| InterfaceAddress | back to summary |
|---|---|
| private InterfaceAddress() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Compares this object against the specified object.
The result is
Two instances of
| |
| getAddress | back to summary |
|---|---|
| public InetAddress getAddress() Returns an
| |
| getBroadcast | back to summary |
|---|---|
| public InetAddress getBroadcast() Returns an
Only IPv4 networks have broadcast address therefore, in the case
of an IPv6 network,
Some network interfaces do not support broadcasting and may
also return
| |
| getNetworkPrefixLength | back to summary |
|---|---|
| public short getNetworkPrefixLength() Returns the network prefix length for this address. This is also known as the subnet mask in the context of IPv4 addresses. Typical IPv4 values would be 8 (255.0.0.0), 16 (255.255.0.0) or 24 (255.255.255.0). Typical IPv6 values would be 128 (::1/128) or 10 (fe80::203:baff:fe27:1243/10)
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns a hashcode for this Interface address.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Converts this Interface address to a
| |