Class BaseFileUploadSource

java.lang.Object
net.sf.basedb.opengrid.filetransfer.AbstractFileTransfer
net.sf.basedb.opengrid.filetransfer.BaseFileUploadSource
All Implemented Interfaces:
UploadSource

public class BaseFileUploadSource extends AbstractFileTransfer implements UploadSource
Upload source implementation for uploading a BASE file to a remote server.
Since:
1.0
Author:
nicklas
  • Field Details

    • file

      private final File file
  • Constructor Details

    • BaseFileUploadSource

      public BaseFileUploadSource(File file)
      Create a new upload source that references the given file in BASE.
  • Method Details

    • initMetadata

      protected void initMetadata(FileMetaData metadata)
      Description copied from class: AbstractFileTransfer
      Subclasses that are implementing the UploadSource interface should override this method and initialize the metadata instance with information about the loca file. This method is called also for DownloadTarget implementations but can typically be ignored since the metadata will be overwritten with information from the remote server.
      Overrides:
      initMetadata in class AbstractFileTransfer
    • getInputStream

      public InputStream getInputStream()
      Description copied from interface: UploadSource
      Get an input stream for reading the resource data.
      Specified by:
      getInputStream in interface UploadSource