public class BluetoothPayloadBuilder
extends java.lang.Object
Constructor and Description |
---|
BluetoothPayloadBuilder()
Instatiates a payload without any data.
|
BluetoothPayloadBuilder(byte type,
byte value)
Appends a byte value.
|
BluetoothPayloadBuilder(byte type,
byte[] value)
Instantiates a payload builder with a first value.
|
BluetoothPayloadBuilder(byte type,
java.lang.String value)
Appends a String value.
|
Modifier and Type | Method and Description |
---|---|
BluetoothPayloadBuilder |
append(byte type,
byte value)
Appends a byte payload.
|
BluetoothPayloadBuilder |
append(byte type,
byte[] value)
Appends a byte array payload.
|
BluetoothPayloadBuilder |
append(byte type,
java.lang.String value)
Appends a String payload.
|
byte[] |
getPayload()
Gets the payload, this is not a copy of the payload.
|
BluetoothPayloadBuilder |
remove(byte type)
Appends a String payload.
|
public BluetoothPayloadBuilder()
public BluetoothPayloadBuilder(byte type, byte[] value)
type
- the type of payload to add.value
- the value of the payload to add.public BluetoothPayloadBuilder(byte type, byte value)
type
- the type of payload to add.value
- the value of the payload to add.public BluetoothPayloadBuilder(byte type, java.lang.String value)
type
- the type of payload to add.value
- the value of the payload to add.public BluetoothPayloadBuilder append(byte type, byte[] value)
type
- the type of payload to add.value
- the value of the payload to add.public BluetoothPayloadBuilder append(byte type, byte value)
type
- the type of payload to add.value
- the value of the payload to add.public BluetoothPayloadBuilder append(byte type, java.lang.String value)
type
- the type of payload to add.value
- the value of the payload to add.public BluetoothPayloadBuilder remove(byte type)
type
- the type of payload to remove.public byte[] getPayload()