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 StringgetContentType()InputStreamgetInputStream()StringgetName()OutputStreamgetOutputStream()longgetSize()
-
-
-
Constructor Detail
-
FileObjectDataSource
public FileObjectDataSource(org.apache.commons.vfs2.FileObject file, String contentType)
-
-
Method Detail
-
getSize
public long getSize()
- Specified by:
getSizein interfaceorg.apache.axiom.ext.activation.SizeAwareDataSource
-
getContentType
public String getContentType()
- Specified by:
getContentTypein interfaceDataSource
-
getName
public String getName()
- Specified by:
getNamein interfaceDataSource
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStreamin interfaceDataSource- Throws:
IOException
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Specified by:
getOutputStreamin interfaceDataSource- Throws:
IOException
-
-