net.rim.device.api.io.messaging
Interface ByteMessage

All Superinterfaces:
Message

public interface ByteMessage
extends Message

Contains byte array data to be sent or received.

Since:
BlackBerry API 6.0.0

Field Summary
 
Fields inherited from interface net.rim.device.api.io.messaging.Message
PRIORITY_MAX, PRIORITY_MIN
 
Method Summary
 byte[] getBytePayload()
          Returns a byte representation of a message body.
 String getStringPayload()
          Returns a string representation of a message body.
 void setBytePayload(byte[] body)
          Sets the body of the message using a byte array.
 void setStringPayload(String body)
          Sets the body of the message using a string.
 
Methods inherited from interface net.rim.device.api.io.messaging.Message
cancel, getCorrelatedMessageId, getMessageId, getMessageProperty, getObjectPayload, getPriority, getTransportHeader, getTransportHeaders, getTransportHeadersForKey, isCancellable, setCancellable, setMessageProperty, setPriority, setTTL, setTransportHeader, setTransportHeader, setTransportHeaders
 



Method Detail

getBytePayload

byte[] getBytePayload()
Returns a byte representation of a message body.

Returns:
A byte representation of a message body.
Since:
BlackBerry API 6.0.0

getStringPayload

String getStringPayload()
Returns a string representation of a message body.

Returns:
A string representation a message body.
Since:
BlackBerry API 6.0.0

setBytePayload

void setBytePayload(byte[] body)
                    throws MessageModificationException
Sets the body of the message using a byte array. If the message already has a body, the existing body will be deleted.

Parameters:
body - A byte representation of message body.
Throws:
MessageModificationException
Since:
BlackBerry API 6.0.0

setStringPayload

void setStringPayload(String body)
                      throws MessageModificationException
Sets the body of the message using a string. If the message already has a body, the existing body will be deleted.

Parameters:
body - A string representation of message body.
Throws:
MessageModificationException
Since:
BlackBerry API 6.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal