org.apache.synapse.commons.vfs
Class FileObjectDataSource
java.lang.Object
org.apache.synapse.commons.vfs.FileObjectDataSource
- All Implemented Interfaces:
- javax.activation.DataSource, org.apache.axiom.ext.activation.SizeAwareDataSource
public class FileObjectDataSource
- extends Object
- implements org.apache.axiom.attachments.SizeAwareDataSource
Data source that reads data from a VFS FileObject.
This class is similar to VFS' own FileObjectDataSource implementation, but in addition
implements SizeAwareDataSource.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileObjectDataSource
public FileObjectDataSource(org.apache.commons.vfs2.FileObject file,
String contentType)
getSize
public long getSize()
- Specified by:
getSize in interface org.apache.axiom.ext.activation.SizeAwareDataSource
getContentType
public String getContentType()
- Specified by:
getContentType in interface javax.activation.DataSource
getName
public String getName()
- Specified by:
getName in interface javax.activation.DataSource
getInputStream
public InputStream getInputStream()
throws IOException
- Specified by:
getInputStream in interface javax.activation.DataSource
- Throws:
IOException
getOutputStream
public OutputStream getOutputStream()
throws IOException
- Specified by:
getOutputStream in interface javax.activation.DataSource
- Throws:
IOException
Copyright © 2005–2015 Apache Software Foundation. All rights reserved.