FileDocCategorySizeDatePackage
BinaryObject.javaAPI DocphoneME MR2 API (J2ME)2771Wed May 02 18:00:32 BST 2007com.sun.tck.wma.sms

BinaryObject

public class BinaryObject extends MessageObject implements com.sun.tck.wma.BinaryMessage
Implements an instance of a binary message.

Fields Summary
private byte[]
buffer
Buffer that will hold the data payload.
Constructors Summary
public BinaryObject(String addr)
Construct a binary specific message.

param
addr the destination address of the message.

	super(MessageConnection.BINARY_MESSAGE, addr);
    
Methods Summary
public byte[]getPayloadData()
Returns an array of bytes representing the payload data of the message, or null if it isn't set.

A reference to the byte array of this binary message is returned. It is the same for all calls to this method made before setPayloadData is called the next time.

return
null if the data hasn't been set, or this message's payload data
see
#setPayloadData

        return buffer;
    
public voidsetPayloadData(byte[] data)
Sets the payload data of this binary message. It may be set to null.

This method actually sets the reference to the byte array. Changes made to this array subsequently affect this BinaryMessage object's contents. Therefore, this array should not be reused by the applications until the message is sent and MessageConnection.send returned.

param
data payload data represented as a byte array
see
#getPayloadData

        buffer = data;