Package org.apache.synapse.commons.vfs
Class FileObjectDataSource
- java.lang.Object
-
- org.apache.synapse.commons.vfs.FileObjectDataSource
-
- All Implemented Interfaces:
DataSource
,org.apache.axiom.attachments.SizeAwareDataSource
,org.apache.axiom.ext.activation.SizeAwareDataSource
public class FileObjectDataSource extends Object implements org.apache.axiom.attachments.SizeAwareDataSource
Data source that reads data from a VFSFileObject
. This class is similar to VFS' own FileObjectDataSource implementation, but in addition implementsSizeAwareDataSource
.
-
-
Constructor Summary
Constructors Constructor Description FileObjectDataSource(org.apache.commons.vfs2.FileObject file, 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
-
FileObjectDataSource
public FileObjectDataSource(org.apache.commons.vfs2.FileObject file, String contentType)
-
-
Method Detail
-
getSize
public long getSize()
- Specified by:
getSize
in interfaceorg.apache.axiom.ext.activation.SizeAwareDataSource
-
getContentType
public String getContentType()
- Specified by:
getContentType
in interfaceDataSource
-
getName
public String getName()
- Specified by:
getName
in interfaceDataSource
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStream
in interfaceDataSource
- Throws:
IOException
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Specified by:
getOutputStream
in interfaceDataSource
- Throws:
IOException
-
-