org.mockejb.jms
Class StreamMessageImpl

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

public class StreamMessageImpl
extends MessageImpl
implements javax.jms.StreamMessage

StreamMessage implementation.

Author:
Dimitar Gospodinov

Field Summary
 
Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
 
Constructor Summary
StreamMessageImpl()
          Creates empty StreamMessageImpl.
StreamMessageImpl(javax.jms.StreamMessage msg)
          Creates new StreamMessageImpl initialized with header, properties and body from msg.
 
Method Summary
 void clearBody()
           
 boolean readBoolean()
           
 byte readByte()
           
 int readBytes(byte[] bytes)
           
 char readChar()
           
 double readDouble()
           
 float readFloat()
           
 int readInt()
           
 long readLong()
           
 java.lang.Object readObject()
           
 short readShort()
           
 java.lang.String readString()
           
 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 writeString(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

StreamMessageImpl

public StreamMessageImpl()
Creates empty StreamMessageImpl.


StreamMessageImpl

public StreamMessageImpl(javax.jms.StreamMessage msg)
                  throws javax.jms.JMSException
Creates new StreamMessageImpl initialized with 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

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()

readBoolean

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

readByte

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

readShort

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

readChar

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

readInt

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

readLong

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

readFloat

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

readDouble

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

readString

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

readBytes

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

readObject

public java.lang.Object readObject()
                            throws javax.jms.JMSException
Specified by:
readObject in interface javax.jms.StreamMessage
Throws:
javax.jms.JMSException
See Also:
StreamMessage.readObject()

writeBoolean

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

writeByte

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

writeShort

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

writeChar

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

writeInt

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

writeLong

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

writeFloat

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

writeDouble

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

writeString

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

writeBytes

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

writeBytes

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

writeObject

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

reset

public void reset()
           throws javax.jms.JMSException
Specified by:
reset in interface javax.jms.StreamMessage
Throws:
javax.jms.JMSException
See Also:
StreamMessage.reset()