Interface RemoteFile

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void appendTo​(java.io.OutputStream out)
      Write the contents of this remote file to an output stream.
      void cleanup()
      Cleanup this remote file.
      void copyTo​(java.io.File destFile)
      Copy remotefile to local disk storage.
      java.lang.String getChecksum()
      Returns a MD5 Checksum on the file.
      java.io.InputStream getInputStream()
      Get an inputstream that contains the data transferred in this RemoteFile.
      java.lang.String getName()
      Return the file name.
      long getSize()
      Returns the total size of the remote file.
    • Method Detail

      • copyTo

        void copyTo​(java.io.File destFile)
        Copy remotefile to local disk storage. Used by the data recipient
        Parameters:
        destFile - local File
        Throws:
        IOFailure - on communication trouble.
        ArgumentNotValid - on null parameter or non-writable file
      • appendTo

        void appendTo​(java.io.OutputStream out)
        Write the contents of this remote file to an output stream.
        Parameters:
        out - OutputStream that the data will be written to. This stream will not be closed by this operation.
        Throws:
        IOFailure - If append operation fails
        ArgumentNotValid - on null parameter
      • getInputStream

        java.io.InputStream getInputStream()
        Get an inputstream that contains the data transferred in this RemoteFile.
        Returns:
        A stream object with the data in the object. Note that the close() method of this may throw exceptions if e.g. a transmission error is detected.
        Throws:
        IOFailure - on communication trouble.
      • getName

        java.lang.String getName()
        Return the file name.
        Returns:
        the file name
      • getChecksum

        java.lang.String getChecksum()
        Returns a MD5 Checksum on the file. May return null, if checksums not supported for this operation.
        Returns:
        MD5 checksum
      • cleanup

        void cleanup()
        Cleanup this remote file. The file is invalid after this.
      • getSize

        long getSize()
        Returns the total size of the remote file.
        Returns:
        Size of the remote file.