java.lang.Object | |
↳ | java.net.InterfaceAddress |
Identifies one of a network interface's addresses. These are passed back from the JNI behind NetworkInterface.getNetworkInterfaces. Multiple addresses for the same interface are collected together on the Java side.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Tests whether this object is equal to another one.
| |||||||||||
Returns the InetAddress for this address.
| |||||||||||
Returns the subnet-directed broadcast address if this is an IPv4 interface, null otherwise.
| |||||||||||
Returns the network prefix length in bits.
| |||||||||||
Returns an integer hash code for this object.
| |||||||||||
Returns a string representation for this interface address.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Tests whether this object is equal to another one. Returns true if the address, broadcast address and prefix length are all equal.
obj | the object to be compared. |
---|
Returns the subnet-directed broadcast address if this is an IPv4 interface, null otherwise.
Returns the network prefix length in bits. (In IPv4 parlance, this is known as the subnet mask, but this method applies to IPv6 addresses too.)
Returns an integer hash code for this object. By contract, any two
objects for which equals(Object)
returns true
must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode
method
if you intend implementing your own hashCode
method.
Returns a string representation for this interface address. The string is of the form: InetAddress / prefix length [ broadcast address ].