org.mockejb.jms
Class BytesMessageImpl

java.lang.Object
  extended byorg.mockejb.jms.MessageImpl
      extended byorg.mockejb.jms.BytesMessageImpl
All Implemented Interfaces:
javax.jms.BytesMessage, javax.jms.Message

public class BytesMessageImpl
extends MessageImpl
implements javax.jms.BytesMessage

BytesMessage implementation.

Author:
Dimitar Gospodinov
See Also:
BytesMessage

Field Summary
 
Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
 
Constructor Summary
BytesMessageImpl()
          Creates empty BytesMessage
BytesMessageImpl(javax.jms.BytesMessage msg)
          Creates BytesMessage and copies its header, properties and body from msg The state of msg is not changed.
 
Method Summary
 void clearBody()
           
 long getBodyLength()
          Returns body length.
 boolean readBoolean()
           
 byte readByte()
           
 int readBytes(byte[] bytes)
           
 int readBytes(byte[] bytes, int length)
           
 char readChar()
           
 double readDouble()
           
 float readFloat()
           
 int readInt()
           
 long readLong()
           
 short readShort()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 java.lang.String readUTF()
           
 void reset()
           
 void writeBoolean(boolean value)
           
 void writeByte(byte value)
           
 void writeBytes(byte[] bytes)
           
 void writeBytes(byte[] bytes, int offset, int length)
           
 void writeChar(char value)
           
 void writeDouble(double value)
           
 void writeFloat(float value)
           
 void writeInt(int value)
           
 void writeLong(long value)
           
 void writeObject(java.lang.Object value)
           
 void writeShort(short value)
           
 void writeUTF(java.lang.String value)
           
 
Methods inherited from class org.mockejb.jms.MessageImpl
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, setPropertiesNotWriteable, setShortProperty, setStringProperty
 
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
 

Constructor Detail

BytesMessageImpl

public BytesMessageImpl()
                 throws javax.jms.JMSException
Creates empty BytesMessage


BytesMessageImpl

public BytesMessageImpl(javax.jms.BytesMessage msg)
                 throws javax.jms.JMSException
Creates BytesMessage and copies its header, properties and body from msg The state of msg is not changed.

Parameters:
msg - message to copy from
Throws:
javax.jms.JMSException
Method Detail

reset

public void reset()
Specified by:
reset in interface javax.jms.BytesMessage
See Also:
BytesMessage.reset()

clearBody

public void clearBody()
               throws javax.jms.JMSException
Specified by:
clearBody in interface javax.jms.Message
Overrides:
clearBody in class MessageImpl
Throws:
javax.jms.JMSException
See Also:
Message.clearBody()

getBodyLength

public long getBodyLength()
                   throws javax.jms.JMSException
Returns body length. Method is part of BytesMessage interface, version 1.1

Returns:
body length.
Throws:
javax.jms.JMSException

readBoolean

public boolean readBoolean()
                    throws javax.jms.JMSException
Specified by:
readBoolean in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.readBoolean()

readByte

public byte readByte()
              throws javax.jms.JMSException
Specified by:
readByte in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.readByte()

readUnsignedByte

public int readUnsignedByte()
                     throws javax.jms.JMSException
Specified by:
readUnsignedByte in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.readUnsignedByte()

readShort

public short readShort()
                throws javax.jms.JMSException
Specified by:
readShort in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.readShort()

readUnsignedShort

public int readUnsignedShort()
                      throws javax.jms.JMSException
Specified by:
readUnsignedShort in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.readUnsignedShort()

readChar

public char readChar()
              throws javax.jms.JMSException
Specified by:
readChar in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.readChar()

readInt

public int readInt()
            throws javax.jms.JMSException
Specified by:
readInt in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.readInt()

readLong

public long readLong()
              throws javax.jms.JMSException
Specified by:
readLong in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.readLong()

readFloat

public float readFloat()
                throws javax.jms.JMSException
Specified by:
readFloat in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.readFloat()

readDouble

public double readDouble()
                  throws javax.jms.JMSException
Specified by:
readDouble in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.readDouble()

readUTF

public java.lang.String readUTF()
                         throws javax.jms.JMSException
Specified by:
readUTF in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.readUTF()

readBytes

public int readBytes(byte[] bytes)
              throws javax.jms.JMSException
Specified by:
readBytes in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.readBytes(byte[])

readBytes

public int readBytes(byte[] bytes,
                     int length)
              throws javax.jms.JMSException
Specified by:
readBytes in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.readBytes(byte[], int)

writeBoolean

public void writeBoolean(boolean value)
                  throws javax.jms.JMSException
Specified by:
writeBoolean in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.writeBoolean(boolean)

writeByte

public void writeByte(byte value)
               throws javax.jms.JMSException
Specified by:
writeByte in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.writeByte(byte)

writeShort

public void writeShort(short value)
                throws javax.jms.JMSException
Specified by:
writeShort in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.writeShort(short)

writeChar

public void writeChar(char value)
               throws javax.jms.JMSException
Specified by:
writeChar in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.writeChar(char)

writeInt

public void writeInt(int value)
              throws javax.jms.JMSException
Specified by:
writeInt in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.writeInt(int)

writeLong

public void writeLong(long value)
               throws javax.jms.JMSException
Specified by:
writeLong in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.writeLong(long)

writeFloat

public void writeFloat(float value)
                throws javax.jms.JMSException
Specified by:
writeFloat in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.writeFloat(float)

writeDouble

public void writeDouble(double value)
                 throws javax.jms.JMSException
Specified by:
writeDouble in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.writeDouble(double)

writeUTF

public void writeUTF(java.lang.String value)
              throws javax.jms.JMSException
Specified by:
writeUTF in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.writeUTF(java.lang.String)

writeBytes

public void writeBytes(byte[] bytes)
                throws javax.jms.JMSException
Specified by:
writeBytes in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.writeBytes(byte[])

writeBytes

public void writeBytes(byte[] bytes,
                       int offset,
                       int length)
                throws javax.jms.JMSException
Specified by:
writeBytes in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.writeBytes(byte[], int, int)

writeObject

public void writeObject(java.lang.Object value)
                 throws javax.jms.JMSException
Specified by:
writeObject in interface javax.jms.BytesMessage
Throws:
javax.jms.JMSException
See Also:
BytesMessage.writeObject(java.lang.Object)