Joram ${version}

org.objectweb.joram.client.jms
Class BytesMessage

java.lang.Object
  extended byorg.objectweb.joram.client.jms.Message
      extended byorg.objectweb.joram.client.jms.BytesMessage
All Implemented Interfaces:
javax.jms.BytesMessage, javax.jms.Message

public class BytesMessage
extends Message
implements javax.jms.BytesMessage

Implements the javax.jms.BytesMessage interface.


Field Summary
 
Fields inherited from class org.objectweb.joram.client.jms.Message
momMsg, sess
 
Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
 
Method Summary
 void clearBody()
          API method.
 long getBodyLength()
          API method.
protected  void prepare()
          Method actually preparing the message for sending by transfering the local body into the wrapped MOM message.
 boolean readBoolean()
          API method.
 byte readByte()
          API method.
 int readBytes(byte[] value)
          API method.
 int readBytes(byte[] value, int length)
          API method.
 char readChar()
          API method.
 double readDouble()
          API method.
 float readFloat()
          API method.
 int readInt()
          API method.
 long readLong()
          API method.
 short readShort()
          API method.
 int readUnsignedByte()
          API method.
 int readUnsignedShort()
          API method.
 java.lang.String readUTF()
          API method.
 void reset()
          API method.
 void writeBoolean(boolean value)
          API method.
 void writeByte(byte value)
          API method.
 void writeBytes(byte[] value)
          API method.
 void writeBytes(byte[] value, int offset, int length)
          API method.
 void writeChar(char value)
          API method.
 void writeDouble(double value)
          API method.
 void writeFloat(float value)
          API method.
 void writeInt(int value)
          API method.
 void writeLong(long value)
          API method.
 void writeObject(java.lang.Object value)
          API method.
 void writeShort(short value)
          API method.
 void writeUTF(java.lang.String value)
          API method.
 
Methods inherited from class org.objectweb.joram.client.jms.Message
acknowledge, clearProperties, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty, wrapMomMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.Message
acknowledge, clearProperties, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty
 

Method Detail

getBodyLength

public long getBodyLength()
                   throws javax.jms.JMSException
API method.

Specified by:
getBodyLength in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotReadableException - If the message is WRITE-ONLY.
javax.jms.JMSException

clearBody

public void clearBody()
               throws javax.jms.JMSException
API method.

Specified by:
clearBody in interface javax.jms.Message
Overrides:
clearBody in class Message
Throws:
javax.jms.JMSException - In case of an error while closing the output or input streams.

writeBoolean

public void writeBoolean(boolean value)
                  throws javax.jms.JMSException
API method.

Specified by:
writeBoolean in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotWriteableException - If the message body is read-only.
javax.jms.JMSException - If the value could not be written on the stream.

writeByte

public void writeByte(byte value)
               throws javax.jms.JMSException
API method.

Specified by:
writeByte in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotWriteableException - If the message body is read-only.
javax.jms.JMSException - If the value could not be written on the stream.

writeBytes

public void writeBytes(byte[] value)
                throws javax.jms.JMSException
API method.

Specified by:
writeBytes in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotWriteableException - If the message body is read-only.
javax.jms.JMSException - If the value could not be written on the stream.

writeBytes

public void writeBytes(byte[] value,
                       int offset,
                       int length)
                throws javax.jms.JMSException
API method.

Specified by:
writeBytes in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotWriteableException - If the message body is read-only.
javax.jms.JMSException - If the value could not be written on the stream.

writeChar

public void writeChar(char value)
               throws javax.jms.JMSException
API method.

Specified by:
writeChar in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotWriteableException - If the message body is read-only.
javax.jms.JMSException - If the value could not be written on the stream.

writeDouble

public void writeDouble(double value)
                 throws javax.jms.JMSException
API method.

Specified by:
writeDouble in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotWriteableException - If the message body is read-only.
javax.jms.JMSException - If the value could not be written on the stream.

writeFloat

public void writeFloat(float value)
                throws javax.jms.JMSException
API method.

Specified by:
writeFloat in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotWriteableException - If the message body is read-only.
javax.jms.JMSException - If the value could not be written on the stream.

writeInt

public void writeInt(int value)
              throws javax.jms.JMSException
API method.

Specified by:
writeInt in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotWriteableException - If the message body is read-only.
javax.jms.JMSException - If the value could not be written on the stream.

writeLong

public void writeLong(long value)
               throws javax.jms.JMSException
API method.

Specified by:
writeLong in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotWriteableException - If the message body is read-only.
javax.jms.JMSException - If the value could not be written on the stream.

writeShort

public void writeShort(short value)
                throws javax.jms.JMSException
API method.

Specified by:
writeShort in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotWriteableException - If the message body is read-only.
javax.jms.JMSException - If the value could not be written on the stream.

writeUTF

public void writeUTF(java.lang.String value)
              throws javax.jms.JMSException
API method.

Specified by:
writeUTF in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotWriteableException - If the message body is read-only.
javax.jms.JMSException - If the value could not be written on the stream.

writeObject

public void writeObject(java.lang.Object value)
                 throws javax.jms.JMSException
API method.

Specified by:
writeObject in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotWriteableException - If the message body is read-only.
javax.jms.MessageFormatException - If the value type is invalid.
javax.jms.JMSException - If the value could not be written on the stream.

readBoolean

public boolean readBoolean()
                    throws javax.jms.JMSException
API method.

Specified by:
readBoolean in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotReadableException - If the message body is write-only.
javax.jms.JMSException - If an exception occurs while reading the bytes.

readByte

public byte readByte()
              throws javax.jms.JMSException
API method.

Specified by:
readByte in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotReadableException - If the message body is write-only.
javax.jms.JMSException - If an exception occurs while reading the bytes.

readUnsignedByte

public int readUnsignedByte()
                     throws javax.jms.JMSException
API method.

Specified by:
readUnsignedByte in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotReadableException - If the message body is write-only.
javax.jms.JMSException - If an exception occurs while reading the bytes.

readShort

public short readShort()
                throws javax.jms.JMSException
API method.

Specified by:
readShort in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotReadableException - If the message body is write-only.
javax.jms.JMSException - If an exception occurs while reading the bytes.

readUnsignedShort

public int readUnsignedShort()
                      throws javax.jms.JMSException
API method.

Specified by:
readUnsignedShort in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotReadableException - If the message body is write-only.
javax.jms.JMSException - If an exception occurs while reading the bytes.

readChar

public char readChar()
              throws javax.jms.JMSException
API method.

Specified by:
readChar in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotReadableException - If the message body is write-only.
javax.jms.JMSException - If an exception occurs while reading the bytes.

readInt

public int readInt()
            throws javax.jms.JMSException
API method.

Specified by:
readInt in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotReadableException - If the message body is write-only.
javax.jms.JMSException - If an exception occurs while reading the bytes.

readLong

public long readLong()
              throws javax.jms.JMSException
API method.

Specified by:
readLong in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotReadableException - If the message body is write-only.
javax.jms.JMSException - If an exception occurs while reading the bytes.

readFloat

public float readFloat()
                throws javax.jms.JMSException
API method.

Specified by:
readFloat in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotReadableException - If the message body is write-only.
javax.jms.JMSException - If an exception occurs while reading the bytes.

readDouble

public double readDouble()
                  throws javax.jms.JMSException
API method.

Specified by:
readDouble in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotReadableException - If the message body is write-only.
javax.jms.JMSException - If an exception occurs while reading the bytes.

readBytes

public int readBytes(byte[] value)
              throws javax.jms.JMSException
API method.

Specified by:
readBytes in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotReadableException - If the message body is write-only.
javax.jms.JMSException - If an exception occurs while reading the bytes.

readBytes

public int readBytes(byte[] value,
                     int length)
              throws javax.jms.JMSException
API method.

Specified by:
readBytes in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotReadableException - If the message body is write-only.
javax.jms.JMSException - If an exception occurs while reading the bytes.

readUTF

public java.lang.String readUTF()
                         throws javax.jms.JMSException
API method.

Specified by:
readUTF in interface javax.jms.BytesMessage
Throws:
javax.jms.MessageNotReadableException - If the message body is write-only.
javax.jms.JMSException - If an exception occurs while reading the bytes.

reset

public void reset()
           throws javax.jms.JMSException
API method.

Specified by:
reset in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException - If an error occurs while closing the output stream.

prepare

protected void prepare()
                throws java.lang.Exception
Method actually preparing the message for sending by transfering the local body into the wrapped MOM message.

Overrides:
prepare in class Message
Throws:
java.lang.Exception - If an error occurs while serializing.

Joram ${version}

Copyright ? 2005 Scalagent - All rights reserved