org.apache.synapse.transport.vfs
Class FileObjectDataSource

java.lang.Object
  extended by org.apache.synapse.transport.vfs.FileObjectDataSource
All Implemented Interfaces:
DataSource, SizeAwareDataSource

public class FileObjectDataSource
extends Object
implements SizeAwareDataSource

Data source that reads data from a VFS FileObject. This class is similar to VFS' own FileObjectDataSource implementation, but in addition implements SizeAwareDataSource.


Constructor Summary
FileObjectDataSource(org.apache.commons.vfs2.FileObject file, String contentType)
           
 
Method Summary
 String getContentType()
           
 InputStream getInputStream()
           
 String getName()
           
 OutputStream getOutputStream()
           
 long getSize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileObjectDataSource

public FileObjectDataSource(org.apache.commons.vfs2.FileObject file,
                            String contentType)
Method Detail

getSize

public long getSize()
Specified by:
getSize in interface SizeAwareDataSource

getContentType

public String getContentType()
Specified by:
getContentType in interface DataSource

getName

public String getName()
Specified by:
getName in interface DataSource

getInputStream

public InputStream getInputStream()
                           throws IOException
Specified by:
getInputStream in interface DataSource
Throws:
IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Specified by:
getOutputStream in interface DataSource
Throws:
IOException


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.