Interface IIncomingFileTransferReceiveResumedEvent

All Superinterfaces:
Event, IFileTransferEvent, IIncomingFileTransferEvent

public interface IIncomingFileTransferReceiveResumedEvent extends IIncomingFileTransferEvent
Event sent to IFileTransferListener associated with IIncomingFileTransfer instances when file transfer is resumed.
  • Method Details

    • getFileID

      IFileID getFileID()
      Get IFileID for incoming file
      Returns:
      IFileID for this file transfer event. Will not be null.
    • receive

      IIncomingFileTransfer receive(File localFileToSave, boolean append) throws IOException
      Get incoming file transfer object by specifying a local File instance to save the received contents to.
      Parameters:
      localFileToSave - the file on the local file system to receive and save the remote file. Must not be null.
      append - if true, and data received is appended to the given localFileToSave. If false, data are written to the beginning of the given localFileToSave, and any existing contents are overwritten.
      Returns:
      IIncomingFileTransfer the incoming file transfer object. Will not be null.
      Throws:
      IOException - if localFileToSave cannot be opened for writing.
      Since:
      2.0
    • receive

      IIncomingFileTransfer receive(File localFileToSave, FileTransferJob fileTransferJob, boolean append) throws IOException
      Just like receive(File,boolean) but this method also give the caller a chance to provide a factory that creates the job that will perform the actual file transfer. The intended use for this is when the user of the framework needs more elaborate control over such jobs such as waiting for a group of parallel file transfers to complete. Such functionality can for instance exploit the Eclipse runtime concept of Job families.
      Parameters:
      localFileToSave - the file on the local file system to receive and save the remote file. Must not be null.
      append - if true, and data received is appended to the given localFileToSave. If false, data are written to the beginning of the given localFileToSave, and any existing contents are overwritten.
      fileTransferJob - A subclass of FileTransferJob to use to run the actual transfer. If null, provider will create default implementation. NOTE: the given job should *not* be scheduled/started prior to being provided as parameter to this method.
      Returns:
      IIncomingFileTransfer the incoming file transfer object. NOTE: the caller is responsible for calling OutputStream.close() on the OutputStream provided. If the stream provided is buffered, then BufferedOutputStream.flush() should be called to guarantee that the data received is actually written to the given OutputStream.
      Throws:
      IOException - if streamToStore cannot be opened for writing.
      Since:
      2.0
    • receive

      IIncomingFileTransfer receive(OutputStream streamToStore) throws IOException
      Get incoming file transfer by specifying an OutputStream instance to save the received contents to. NOTE: the caller is responsible for calling OutputStream.close() on the OutputStream provided. If the stream provided is buffered, then BufferedOutputStream.flush() should be called to guaranteed that the data received is actually written to the given OutputStream.
      Parameters:
      streamToStore - the output stream to store the incoming file. Must not be null.
      Returns:
      IIncomingFileTransfer the incoming file transfer object. NOTE: the caller is responsible for calling OutputStream.close() on the OutputStream provided. If the stream provided is buffered, then BufferedOutputStream.flush() should be called to guarantee that the data received is actually written to the given OutputStream.
      Throws:
      IOException - if streamToStore cannot be opened for writing
    • receive

      IIncomingFileTransfer receive(OutputStream streamToStore, FileTransferJob fileTransferJob) throws IOException
      Just like receive(OutputStream) but this method also give the caller a chance to provide a factory that creates the job that will perform the actual file transfer. The intended use for this is when the user of the framework needs more elaborate control over such jobs such as waiting for a group of parallel file transfers to complete. Such functionality can for instance exploit the Eclipse runtime concept of Job families.
      Parameters:
      streamToStore - the output stream to store the incoming file. Must not be null.
      fileTransferJob - A subclass of FileTransferJob to use to run the actual transfer. If null, provider will create default implementation. NOTE: the given job should *not* be scheduled/started prior to being provided as a parameter to this method.
      Returns:
      IIncomingFileTransfer the incoming file transfer object. NOTE: the caller is responsible for calling OutputStream.close() on the OutputStream provided. If the stream provided is buffered, then BufferedOutputStream.flush() should be called to guarantee that the data received is actually written to the given OutputStream.
      Throws:
      IOException - if streamToStore cannot be opened for writing
    • cancel

      void cancel()
      Cancel incoming file transfer
    • getResponseHeaders

      Map getResponseHeaders()
      Get response headers.
      Returns:
      Map of response headers. null if no headers available.
      Since:
      4.0