KickJava   Java API By Example, From Geeks To Geeks.

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


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.BytesMessage JavaDoc;
25 import javax.jms.JMSException 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 JmsBytesMessage extends JmsMessage implements BytesMessage JavaDoc
34 {
35    /**
36     * Create a new wrapper
37     *
38     * @param message the message
39     * @param session the session
40     */

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