Class StringRemoteFile

    • Constructor Summary

      Constructors 
      Constructor Description
      StringRemoteFile​(java.lang.String s)  
      StringRemoteFile​(java.lang.String filename, java.lang.String s)  
    • Method Summary

      All Methods Instance Methods Concrete 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()
      Deletes the local file to which this remote file refers.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StringRemoteFile

        public StringRemoteFile​(java.lang.String filename,
                                java.lang.String s)
    • Method Detail

      • copyTo

        public void copyTo​(java.io.File destFile)
        Copy remotefile to local disk storage. Used by the data recipient.
        Specified by:
        copyTo in interface RemoteFile
        Parameters:
        destFile - local File
      • appendTo

        public void appendTo​(java.io.OutputStream out)
        Write the contents of this remote file to an output stream.
        Specified by:
        appendTo in interface RemoteFile
        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
      • getInputStream

        public java.io.InputStream getInputStream()
        Description copied from interface: RemoteFile
        Get an inputstream that contains the data transferred in this RemoteFile.
        Specified by:
        getInputStream in interface 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.
      • getName

        public java.lang.String getName()
        Return the file name.
        Specified by:
        getName in interface RemoteFile
        Returns:
        the file name
      • getChecksum

        public java.lang.String getChecksum()
        Returns a MD5 Checksum on the file.
        Specified by:
        getChecksum in interface RemoteFile
        Returns:
        MD5 checksum
      • cleanup

        public void cleanup()
        Deletes the local file to which this remote file refers.
        Specified by:
        cleanup in interface RemoteFile
      • getSize

        public long getSize()
        Returns the total size of the remote file.
        Specified by:
        getSize in interface RemoteFile
        Returns:
        Size of the remote file.