java.lang.Object | |
↳ | android.net.nsd.NsdServiceInfo |
A class representing service information for network service discovery
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR | Implement the Parcelable interface |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Implement the Parcelable interface
| |||||||||||
Retrive attributes as a map of String keys to byte[] values.
| |||||||||||
Get the host address.
| |||||||||||
Get port number.
| |||||||||||
Get the service name
| |||||||||||
Get the service type
| |||||||||||
Remove an attribute by key
| |||||||||||
Add a service attribute as a key/value pair.
| |||||||||||
Set the host address
| |||||||||||
Set port number
| |||||||||||
Set the service name
| |||||||||||
Set the service type
| |||||||||||
Returns a string containing a concise, human-readable description of this
object.
| |||||||||||
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
Retrive attributes as a map of String keys to byte[] values.
The returned map is unmodifiable; changes must be made through setAttribute(String, String)
and
removeAttribute(String)
.
Get the host address. The host address is valid for a resolved service.
Get port number. The port number is valid for a resolved service.
Add a service attribute as a key/value pair.
Service attributes are included as DNS-SD TXT record pairs.
The key must be US-ASCII printable characters, excluding the '=' character. Values may be UTF-8 strings or null. The total length of key + value must be less than 255 bytes.
Keys should be short, ideally no more than 9 characters, and unique per instance of
NsdServiceInfo
. Calling setAttribute(String, String)
twice with the same key will overwrite
first value.
Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.
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 .
|