Class AbstractFileTransfer

java.lang.Object
net.sf.basedb.opengrid.filetransfer.AbstractFileTransfer
Direct Known Subclasses:
BaseFileDownloadTarget, BaseFileUploadSource, ByteArrayDownloadTarget, ByteArrayUploadSource, OutputStreamDownloadTarget, ServletResponseDownloadTarget

public abstract class AbstractFileTransfer extends Object
Abstract base implementation that is suitable when implementing both file upload and download. This class provides functionality that is common to both the DownloadTarget and UploadSource interfaces, eg. the name and file metdata information. DownloadTarget implementations only need to extend this class and implement the DownloadTarget.getOutputStream() method. File metadata about the remote file should be available in the getMetadata() instance when the DownloadTarget.getOutputStream() method is called. UploadSource implementations that are extending this class need to implement the UploadSource.getInputStream() method. If file metadata is important the implementation should call getMetadata() and initialize the information before the UploadSource.getInputStream() method is called.
Since:
1.0
Author:
nicklas