FileDocCategorySizeDatePackage
BinaryObject.javaAPI DocphoneME MR2 API (J2ME)2887Wed May 02 18:00:32 BST 2007com.sun.midp.io.j2me.sms

BinaryObject

public class BinaryObject extends MessageObject implements BinaryMessage
Implements an instance of a binary message.

Fields Summary
byte[]
buffer
Buffer to be used.
Constructors Summary
public BinaryObject(String addr)
Constructs a binary-specific message.

param
addr the destination address of the message.

	super(MessageConnection.BINARY_MESSAGE, addr);
    
Methods Summary
public byte[]getPayloadData()
The message payload data represented as an array of bytes is returned.

If the payload for the message isn't set, this method returns null.

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
the payload data of this message, or null if the data has not been set
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;
        return;