KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > resource > adapter > jms > JmsStreamMessage


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.resource.adapter.jms;
23
24 import javax.jms.JMSException JavaDoc;
25 import javax.jms.StreamMessage JavaDoc;
26
27 /**
28  * A wrapper for a message
29  *
30  * @author <a HREF="mailto:adrian@jboss.com">Adrian Brock</a>
31  * @version $Revision: 38315 $
32  */

33 public class JmsStreamMessage extends JmsMessage implements StreamMessage JavaDoc
34 {
35    /**
36     * Create a new wrapper
37     *
38     * @param message the message
39     * @param session the session
40     */

41    public JmsStreamMessage(StreamMessage JavaDoc message, JmsSession session)
42    {
43       super(message, session);
44    }
45    
46    public boolean readBoolean() throws JMSException JavaDoc
47    {
48       return ((StreamMessage JavaDoc) message).readBoolean();
49    }
50    
51    public byte readByte() throws JMSException JavaDoc
52    {
53       return ((StreamMessage JavaDoc) message).readByte();
54    }
55    
56    public int readBytes(byte[] value) throws JMSException JavaDoc
57    {
58       return ((StreamMessage JavaDoc) message).readBytes(value);
59    }
60    
61    public char readChar() throws JMSException JavaDoc
62    {
63       return ((StreamMessage JavaDoc) message).readChar();
64    }
65    
66    public double readDouble() throws JMSException JavaDoc
67    {
68       return ((StreamMessage JavaDoc) message).readDouble();
69    }
70    
71    public float readFloat() throws JMSException JavaDoc
72    {
73       return ((StreamMessage JavaDoc) message).readFloat();
74    }
75    
76    public int readInt() throws JMSException JavaDoc
77    {
78       return ((StreamMessage JavaDoc) message).readInt();
79    }
80    
81    public long readLong() throws JMSException JavaDoc
82    {
83       return ((StreamMessage JavaDoc) message).readLong();
84    }
85    
86    public Object JavaDoc readObject() throws JMSException JavaDoc
87    {
88       return ((StreamMessage JavaDoc) message).readObject();
89    }
90    
91    public short readShort() throws JMSException JavaDoc
92    {
93       return ((StreamMessage JavaDoc) message).readShort();
94    }
95    
96    public String JavaDoc readString() throws JMSException JavaDoc
97    {
98       return ((StreamMessage JavaDoc) message).readString();
99    }
100    
101    public void reset() throws JMSException JavaDoc
102    {
103       ((StreamMessage JavaDoc) message).reset();
104    }
105    
106    public void writeBoolean(boolean value) throws JMSException JavaDoc
107    {
108       ((StreamMessage JavaDoc) message).writeBoolean(value);
109    }
110    
111    public void writeByte(byte value) throws JMSException JavaDoc
112    {
113       ((StreamMessage JavaDoc) message).writeByte(value);
114    }
115    
116    public void writeBytes(byte[] value, int offset, int length) throws JMSException JavaDoc
117    {
118       ((StreamMessage JavaDoc) message).writeBytes(value, offset, length);
119    }
120    
121    public void writeBytes(byte[] value) throws JMSException JavaDoc
122    {
123       ((StreamMessage JavaDoc) message).writeBytes(value);
124    }
125    
126    public void writeChar(char value) throws JMSException JavaDoc
127    {
128       ((StreamMessage JavaDoc) message).writeChar(value);
129    }
130    
131    public void writeDouble(double value) throws JMSException JavaDoc
132    {
133       ((StreamMessage JavaDoc) message).writeDouble(value);
134    }
135
136    public void writeFloat(float value) throws JMSException JavaDoc
137    {
138       ((StreamMessage JavaDoc) message).writeFloat(value);
139    }
140
141    public void writeInt(int value) throws JMSException JavaDoc
142    {
143       ((StreamMessage JavaDoc) message).writeInt(value);
144    }
145
146    public void writeLong(long value) throws JMSException JavaDoc
147    {
148       ((StreamMessage JavaDoc) message).writeLong(value);
149    }
150
151    public void writeObject(Object JavaDoc value) throws JMSException JavaDoc
152    {
153       ((StreamMessage JavaDoc) message).writeObject(value);
154    }
155
156    public void writeShort(short value) throws JMSException JavaDoc
157    {
158       ((StreamMessage JavaDoc) message).writeShort(value);
159    }
160
161    public void writeString(String JavaDoc value) throws JMSException JavaDoc
162    {
163       ((StreamMessage JavaDoc) message).writeString(value);
164    }
165 }
166
Popular Tags