org.jboss.messaging.ra
Class JBMBytesMessage

java.lang.Object
  extended by org.jboss.messaging.ra.JBMMessage
      extended by org.jboss.messaging.ra.JBMBytesMessage
All Implemented Interfaces:
javax.jms.BytesMessage, javax.jms.Message

public class JBMBytesMessage
extends JBMMessage
implements javax.jms.BytesMessage

A wrapper for a message

Version:
$Revision: $
Author:
Adrian Brock, Jesper Pedersen

Field Summary
 
Fields inherited from class org.jboss.messaging.ra.JBMMessage
message, session
 
Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
 
Constructor Summary
JBMBytesMessage(javax.jms.BytesMessage message, JBMSession session)
          Create a new wrapper
 
Method Summary
 long getBodyLength()
          Get body length
 boolean readBoolean()
          Read
 byte readByte()
          Read
 int readBytes(byte[] value)
          Read
 int readBytes(byte[] value, int length)
          Read
 char readChar()
          Read
 double readDouble()
          Read
 float readFloat()
          Read
 int readInt()
          Read
 long readLong()
          Read
 short readShort()
          Read
 int readUnsignedByte()
          Read
 int readUnsignedShort()
          Read
 java.lang.String readUTF()
          Read
 void reset()
          Reset
 void writeBoolean(boolean value)
          Write
 void writeByte(byte value)
          Write
 void writeBytes(byte[] value)
          Write
 void writeBytes(byte[] value, int offset, int length)
          Write
 void writeChar(char value)
          Write
 void writeDouble(double value)
          Write
 void writeFloat(float value)
          Write
 void writeInt(int value)
          Write
 void writeLong(long value)
          Write
 void writeObject(java.lang.Object value)
          Write
 void writeShort(short value)
          Write
 void writeUTF(java.lang.String value)
          Write
 
Methods inherited from class org.jboss.messaging.ra.JBMMessage
acknowledge, clearBody, clearProperties, equals, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, hashCode, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.jms.Message
acknowledge, clearBody, 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
 

Constructor Detail

JBMBytesMessage

public JBMBytesMessage(javax.jms.BytesMessage message,
                       JBMSession session)
Create a new wrapper

Parameters:
message - the message
session - the session
Method Detail

getBodyLength

public long getBodyLength()
                   throws javax.jms.JMSException
Get body length

Specified by:
getBodyLength in interface javax.jms.BytesMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readBoolean

public boolean readBoolean()
                    throws javax.jms.JMSException
Read

Specified by:
readBoolean in interface javax.jms.BytesMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readByte

public byte readByte()
              throws javax.jms.JMSException
Read

Specified by:
readByte in interface javax.jms.BytesMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readBytes

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

Specified by:
readBytes in interface javax.jms.BytesMessage
Parameters:
value - The value
length - The length
Returns:
The result
Throws:
javax.jms.JMSException - Thrown if an error occurs

readBytes

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

Specified by:
readBytes in interface javax.jms.BytesMessage
Parameters:
value - The value
Returns:
The result
Throws:
javax.jms.JMSException - Thrown if an error occurs

readChar

public char readChar()
              throws javax.jms.JMSException
Read

Specified by:
readChar in interface javax.jms.BytesMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readDouble

public double readDouble()
                  throws javax.jms.JMSException
Read

Specified by:
readDouble in interface javax.jms.BytesMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readFloat

public float readFloat()
                throws javax.jms.JMSException
Read

Specified by:
readFloat in interface javax.jms.BytesMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readInt

public int readInt()
            throws javax.jms.JMSException
Read

Specified by:
readInt in interface javax.jms.BytesMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readLong

public long readLong()
              throws javax.jms.JMSException
Read

Specified by:
readLong in interface javax.jms.BytesMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readShort

public short readShort()
                throws javax.jms.JMSException
Read

Specified by:
readShort in interface javax.jms.BytesMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readUnsignedByte

public int readUnsignedByte()
                     throws javax.jms.JMSException
Read

Specified by:
readUnsignedByte in interface javax.jms.BytesMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readUnsignedShort

public int readUnsignedShort()
                      throws javax.jms.JMSException
Read

Specified by:
readUnsignedShort in interface javax.jms.BytesMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

readUTF

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

Specified by:
readUTF in interface javax.jms.BytesMessage
Returns:
The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

reset

public void reset()
           throws javax.jms.JMSException
Reset

Specified by:
reset in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeBoolean

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

Specified by:
writeBoolean in interface javax.jms.BytesMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeByte

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

Specified by:
writeByte in interface javax.jms.BytesMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeBytes

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

Specified by:
writeBytes in interface javax.jms.BytesMessage
Parameters:
value - The value
offset - The offset
length - The length
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeBytes

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

Specified by:
writeBytes in interface javax.jms.BytesMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeChar

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

Specified by:
writeChar in interface javax.jms.BytesMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeDouble

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

Specified by:
writeDouble in interface javax.jms.BytesMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeFloat

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

Specified by:
writeFloat in interface javax.jms.BytesMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeInt

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

Specified by:
writeInt in interface javax.jms.BytesMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeLong

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

Specified by:
writeLong in interface javax.jms.BytesMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeObject

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

Specified by:
writeObject in interface javax.jms.BytesMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeShort

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

Specified by:
writeShort in interface javax.jms.BytesMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs

writeUTF

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

Specified by:
writeUTF in interface javax.jms.BytesMessage
Parameters:
value - The value
Throws:
javax.jms.JMSException - Thrown if an error occurs


Copyright © 2006 JBoss Inc. All Rights Reserved.