| public class java.net InterfaceAddress
|
Java SE 6 |
| since | 1.6 |
| See also | java.net.NetworkInterface |
| Methods | |||||||
|---|---|---|---|---|---|---|---|
| public boolean | equals(Object obj) Details
Compares this object against the specified object.
The result is true if and only if the argument is
not null and it represents the same interface address as
this object.
Two instances of
| ||||||
| public int | hashCode() Details
Returns a hashcode for this Interface address.
| ||||||
| public String | toString() Details
Converts this Interface address to a String. The
string returned is of the form: InetAddress / prefix length [ broadcast address ].
| ||||||
| Properties | |||
|---|---|---|---|
| public InetAddress | getAddress() Details
Returns an InetAddress for this address.
| ||
| public InetAddress | getBroadcast() Details
Returns an InetAddress for the brodcast address
for this InterfaceAddress.
Only IPv4 networks have broadcast address therefore, in the case
of an IPv6 network,
| ||
| public short | getNetworkPrefixLength() Details
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)
| ||
| About DocWeb · Bundles · Export · Export All | Top 10 · Statistics · Login |
| About Sun · Contact · Privacy · Terms of Use · Trademarks | Java SE 6 · Copyright © 1994-2009 Sun Microsystems, Inc.All rights reserved. Use is subject to license terms |
![]() |
![]() |
|