001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.resource.adapter.jms;
023:
024: import javax.jms.JMSException;
025: import javax.jms.StreamMessage;
026:
027: /**
028: * A wrapper for a message
029: *
030: * @author <a href="mailto:adrian@jboss.com">Adrian Brock</a>
031: * @version $Revision: 57189 $
032: */
033: public class JmsStreamMessage extends JmsMessage implements
034: StreamMessage {
035: /**
036: * Create a new wrapper
037: *
038: * @param message the message
039: * @param session the session
040: */
041: public JmsStreamMessage(StreamMessage message, JmsSession session) {
042: super (message, session);
043: }
044:
045: public boolean readBoolean() throws JMSException {
046: return ((StreamMessage) message).readBoolean();
047: }
048:
049: public byte readByte() throws JMSException {
050: return ((StreamMessage) message).readByte();
051: }
052:
053: public int readBytes(byte[] value) throws JMSException {
054: return ((StreamMessage) message).readBytes(value);
055: }
056:
057: public char readChar() throws JMSException {
058: return ((StreamMessage) message).readChar();
059: }
060:
061: public double readDouble() throws JMSException {
062: return ((StreamMessage) message).readDouble();
063: }
064:
065: public float readFloat() throws JMSException {
066: return ((StreamMessage) message).readFloat();
067: }
068:
069: public int readInt() throws JMSException {
070: return ((StreamMessage) message).readInt();
071: }
072:
073: public long readLong() throws JMSException {
074: return ((StreamMessage) message).readLong();
075: }
076:
077: public Object readObject() throws JMSException {
078: return ((StreamMessage) message).readObject();
079: }
080:
081: public short readShort() throws JMSException {
082: return ((StreamMessage) message).readShort();
083: }
084:
085: public String readString() throws JMSException {
086: return ((StreamMessage) message).readString();
087: }
088:
089: public void reset() throws JMSException {
090: ((StreamMessage) message).reset();
091: }
092:
093: public void writeBoolean(boolean value) throws JMSException {
094: ((StreamMessage) message).writeBoolean(value);
095: }
096:
097: public void writeByte(byte value) throws JMSException {
098: ((StreamMessage) message).writeByte(value);
099: }
100:
101: public void writeBytes(byte[] value, int offset, int length)
102: throws JMSException {
103: ((StreamMessage) message).writeBytes(value, offset, length);
104: }
105:
106: public void writeBytes(byte[] value) throws JMSException {
107: ((StreamMessage) message).writeBytes(value);
108: }
109:
110: public void writeChar(char value) throws JMSException {
111: ((StreamMessage) message).writeChar(value);
112: }
113:
114: public void writeDouble(double value) throws JMSException {
115: ((StreamMessage) message).writeDouble(value);
116: }
117:
118: public void writeFloat(float value) throws JMSException {
119: ((StreamMessage) message).writeFloat(value);
120: }
121:
122: public void writeInt(int value) throws JMSException {
123: ((StreamMessage) message).writeInt(value);
124: }
125:
126: public void writeLong(long value) throws JMSException {
127: ((StreamMessage) message).writeLong(value);
128: }
129:
130: public void writeObject(Object value) throws JMSException {
131: ((StreamMessage) message).writeObject(value);
132: }
133:
134: public void writeShort(short value) throws JMSException {
135: ((StreamMessage) message).writeShort(value);
136: }
137:
138: public void writeString(String value) throws JMSException {
139: ((StreamMessage) message).writeString(value);
140: }
141: }
|