Class BytesMessageDataSource
- java.lang.Object
-
- org.apache.axis2.transport.jms.iowrappers.BytesMessageDataSource
-
- All Implemented Interfaces:
DataSource
,SizeAwareDataSource
public class BytesMessageDataSource extends Object implements SizeAwareDataSource
Data source implementation wrapping a JMSBytesMessage
.Note that two input streams created by the same instance of this class can not be used at the same time.
-
-
Constructor Summary
Constructors Constructor Description BytesMessageDataSource(javax.jms.BytesMessage message)
BytesMessageDataSource(javax.jms.BytesMessage message, String contentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContentType()
InputStream
getInputStream()
String
getName()
OutputStream
getOutputStream()
long
getSize()
-
-
-
Constructor Detail
-
BytesMessageDataSource
public BytesMessageDataSource(javax.jms.BytesMessage message, String contentType)
-
BytesMessageDataSource
public BytesMessageDataSource(javax.jms.BytesMessage message)
-
-
Method Detail
-
getSize
public long getSize()
- Specified by:
getSize
in interfaceSizeAwareDataSource
-
getContentType
public String getContentType()
- Specified by:
getContentType
in interfaceDataSource
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStream
in interfaceDataSource
- Throws:
IOException
-
getName
public String getName()
- Specified by:
getName
in interfaceDataSource
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Specified by:
getOutputStream
in interfaceDataSource
- Throws:
IOException
-
-