We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

HiWearMessage.Builder

java.lang.Object

|---com.huawei.watch.kit.hiwear.p2p.HiWearMessage.Builder

Collapse
Word wrap
Dark theme
Copy code
  1. public static class HiWearMessage.Builder
  2. extends java.lang.Object

It is the Internal building class of Message.

It is used to build message objects from the wearable device to the phone.

Constructor Summary

Expand

Constructor and Description

Builder()

Method Summary

Expand

Modifier and Type

Method and Description

HiWearMessage

build() Indicates the message constructor.

HiWearMessage.Builder

setDescription(java.lang.String description) Sets message description.

HiWearMessage.Builder

setPayload(byte[] data) Sets byte data.

HiWearMessage.Builder

setPayload(java.io.File file) Sets file data.

Expand

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Builder

public Builder()

Method Detail

setPayload

public HiWearMessage.Builder setPayload(byte[] data)

It is used to set byte data.

Parameters:

Expand

Parameter Name

Parameter Description

data

Data of the byte type.

Returns:

Builder object.

setPayload

public HiWearMessage.Builder setPayload(java.io.File file)

It is used to set file data.

Parameters:

Expand

Parameter Name

Parameter Description

file

Data of the file type.

Returns:

Builder object.

setDescription

public HiWearMessage.Builder setDescription(java.lang.String description)

It is used to set the description.

Parameters:

Expand

Parameter Name

Parameter Description

description

Description.

Returns:

Builder object.

build

public HiWearMessage build()

It indicates the Message constructor.

Returns:

Message message.

Search in References
Enter a keyword.