java.lang.Object | |
↳ | android.net.LinkAddress |
Identifies an IP address on a network link.
A LinkAddress
consists of:
2001:db8::1/64
or 192.0.2.1/24
).
The address must be unicast, as multicast addresses cannot be assigned to interfaces.
OsConstants.IFA_F_*
values representing properties
of the address (e.g., android.system.OsConstants.IFA_F_OPTIMISTIC
).
OsConstants.IFA_F_*
values; defines the scope in which
the address is unique (e.g.,
android.system.OsConstants.RT_SCOPE_LINK
or
android.system.OsConstants.RT_SCOPE_UNIVERSE
).
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR | Implement the Parcelable interface. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Implement the Parcelable interface.
| |||||||||||
Compares this
LinkAddress instance against obj .
| |||||||||||
Returns the
InetAddress of this LinkAddress .
| |||||||||||
Returns the flags of this
LinkAddress .
| |||||||||||
Returns the prefix length of this
LinkAddress .
| |||||||||||
Returns the scope of this
LinkAddress .
| |||||||||||
Returns a hashcode for this address.
| |||||||||||
Returns a string representation of this address, such as "192.0.2.1/24" or "2001:db8::1/64".
| |||||||||||
Implement the Parcelable interface.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
|
Implement the Parcelable interface.
Implement the Parcelable interface.
Compares this LinkAddress
instance against obj
. Two addresses are equal if
their address, prefix length, flags and scope are equal. Thus, for example, two addresses
that have the same address and prefix length are not equal if one of them is deprecated and
the other is not.
obj | the object to be tested for equality. |
---|
true
if both objects are equal, false
otherwise.
Returns a hashcode for this address.
Returns a string representation of this address, such as "192.0.2.1/24" or "2001:db8::1/64". The string representation does not contain the flags and scope, just the address and prefix length.
Implement the Parcelable interface.
dest | The Parcel in which the object should be written. |
---|---|
flags | Additional flags about how the object should be written.
May be 0 or PARCELABLE_WRITE_RETURN_VALUE .
|