FileDocCategorySizeDatePackage
BinaryMessage.javaAPI DocphoneME MR2 API (J2ME)2927Wed May 02 18:00:32 BST 2007javax.wireless.messaging

BinaryMessage

public interface BinaryMessage implements Message
An interface representing a binary message. This is a subinterface of {@link Message Message} which contains methods to get and set the binary data payload. The setPayloadData() method sets the value of the payload in the data container without any checking whether the value is valid in any way. Methods for manipulating the address portion of the message are inherited from Message.

Object instances implementing this interface are just containers for the data that is passed in.

Fields Summary
Constructors Summary
Methods Summary
public byte[]getPayloadData()
Returns the message payload data as an array of bytes.

Returns null, if the payload for the message is not set.

The returned byte array is a reference to the byte array of this message and the same reference is returned for all calls to this method made before the next call to setPayloadData.

return
the payload data of this message or null if the data has not been set
see
#setPayloadData

public voidsetPayloadData(byte[] data)
Sets the payload data of this message. The payload may be set to null.

Setting the payload using this method only sets the reference to the byte array. Changes made to the contents of the byte array subsequently affect the contents of this BinaryMessage object. Therefore, applications should not reuse this byte array before the message is sent and the MessageConnection.send method returns.

param
data payload data as a byte array
see
#getPayloadData