Message Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. service. messaging. Message
- com.
public class Message
IotHub specific message container
Constructor Summary
Constructor | Description | |
---|---|---|
Message() |
Basic constructor |
|
Message(byte[] byteArray) |
byteArray: a byte array containing the body of the message |
|
Message(ByteArrayInputStream stream) |
stream: a stream containing the body of the message |
|
Message(String string) |
Method Summary
Modifier and Type | Method and Description |
---|---|
void | clearCustomProperties() |
ByteArrayOutputStream |
getBodyStream()
The stream content of the body. |
byte [] |
getBytes()
The byte content of the body. |
Map<String, String> | getProperties() |
final void | setDeliveryAcknowledgement(DeliveryAcknowledgement deliveryAcknowledgement) |
void | setProperties(Map<String, String> properties) |
void | setTo(String deviceId) |
Constructor Details
Message
public Message()
Basic constructor
Message
public Message(byte[] byteArray)
byteArray: a byte array containing the body of the message
Parameters:
Message
public Message(ByteArrayInputStream stream)
stream: a stream containing the body of the message
Parameters:
Message
public Message(String string)
Parameters:
Method Details
clearCustomProperties
public void clearCustomProperties()
getBodyStream
public ByteArrayOutputStream getBodyStream()
The stream content of the body.
Returns:
getBytes
public byte [] getBytes()
The byte content of the body.
Returns:
getProperties
public Map
setDeliveryAcknowledgement
public final void setDeliveryAcknowledgement(DeliveryAcknowledgement deliveryAcknowledgement)
Parameters:
setProperties
public void setProperties(Map
Parameters:
setTo
public void setTo(String deviceId)
Parameters: