Experts in SMS and MMS Technology. NCLs Provato is an SMS/MMS Gateway supporting  WAP Push, EMS, MMS, SMS, Nokia Smart Messaging, SMPP, CIMD, UCP, MM7, M20, TC35 NCL Technologies Ltd
Provato - SMS MMS Gateway
Mobile Messaging in J2EE & .NET

SwiftNote - Java SMS Toolkit

ie.ncl.msg
Class BinaryMessage

java.lang.Object
  extended by ie.ncl.msg.Message
      extended by ie.ncl.msg.BinaryMessage
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GsmMessage, SmartMessage, UDHMessage

public class BinaryMessage
extends Message

BinaryMessage extends the base class Message (used for all messages in the Generic API) by implementing the message body as byte[] data.

See Also:
Serialized Form

Constructor Summary
BinaryMessage()
          Create a binary message with no bytes and no address.
BinaryMessage(Address destination)
          Create a new binary message with a destination address and no bytes.
BinaryMessage(Address destination, byte[] bytes)
          Create a new binary message with destination address and byte array body.
BinaryMessage(BinaryMessage m)
          Create a new message from an existing one.
 
Method Summary
 java.lang.Object getBody()
          Get the message body.
 byte[] getBytes()
          Get the bytes of the message.
 void setBody(java.lang.Object body)
          Set the message body.
 void setBytes(byte[] bytes)
          Set the bytes of the message.
 int size()
          Get the number of bytes in the message body.
 
Methods inherited from class ie.ncl.msg.Message
getAttribute, getAttributes, getCorrelationID, getDestination, getID, getSource, getType, putAttribute, removeAttribute, setAttributes, setCorrelationID, setDestination, setID, setSource, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryMessage

public BinaryMessage()
Create a binary message with no bytes and no address.


BinaryMessage

public BinaryMessage(Address destination)
Create a new binary message with a destination address and no bytes.


BinaryMessage

public BinaryMessage(Address destination,
                     byte[] bytes)
Create a new binary message with destination address and byte array body.


BinaryMessage

public BinaryMessage(BinaryMessage m)
Create a new message from an existing one. All message data is copied EXCEPT the correlation ID and the message ID. The attribute set of the message is also cloned/copied (not referenced).

See Also:
Message.Message(Message), Attributes.copy()
Method Detail

getBytes

public byte[] getBytes()
Get the bytes of the message.


setBytes

public void setBytes(byte[] bytes)
Set the bytes of the message.


getBody

public java.lang.Object getBody()
Get the message body. The body object for this class is an array of bytes.

Specified by:
getBody in class Message

setBody

public void setBody(java.lang.Object body)
Set the message body. If the body is not a byte array a ClassCastException is thrown.

Specified by:
setBody in class Message

size

public int size()
Get the number of bytes in the message body.


Experts in SMS and MMS Technology. NCLs Provato is an SMS/MMS Gateway supporting  WAP Push, EMS, MMS, SMS, Nokia Smart Messaging, SMPP, CIMD, UCP, MM7, M20, TC35 NCL Technologies Ltd
Provato - SMS MMS Gateway
Mobile Messaging in J2EE & .NET

SwiftNote - Java SMS Toolkit