Class ScpFromMessageBySftp


  • public class ScpFromMessageBySftp
    extends ScpFromMessage
    A helper object representing an scp download.
    • Constructor Detail

      • ScpFromMessageBySftp

        public ScpFromMessageBySftp​(boolean verbose,
                                    com.jcraft.jsch.Session session,
                                    java.lang.String aRemoteFile,
                                    java.io.File aLocalFile,
                                    boolean recursive)
        Constructor for ScpFromMessageBySftp.
        Parameters:
        verbose - if true log extra information
        session - the Scp session to use
        aRemoteFile - the remote file name
        aLocalFile - the local file
        recursive - if true use recursion
        Since:
        Ant 1.7
      • ScpFromMessageBySftp

        public ScpFromMessageBySftp​(com.jcraft.jsch.Session session,
                                    java.lang.String aRemoteFile,
                                    java.io.File aLocalFile,
                                    boolean recursive)
        Constructor for ScpFromMessageBySftp.
        Parameters:
        session - the Scp session to use
        aRemoteFile - the remote file name
        aLocalFile - the local file
        recursive - if true use recursion
      • ScpFromMessageBySftp

        public ScpFromMessageBySftp​(boolean verbose,
                                    com.jcraft.jsch.Session session,
                                    java.lang.String aRemoteFile,
                                    java.io.File aLocalFile,
                                    boolean recursive,
                                    boolean preserveLastModified)
        Constructor for ScpFromMessageBySftp.
        Parameters:
        verbose - if true log extra information
        session - the Scp session to use
        aRemoteFile - the remote file name
        aLocalFile - the local file
        recursive - if true use recursion
        preserveLastModified - whether to preserve file modification times
        Since:
        Ant 1.8.0
    • Method Detail

      • execute

        public void execute()
                     throws java.io.IOException,
                            com.jcraft.jsch.JSchException
        Carry out the transfer.
        Overrides:
        execute in class ScpFromMessage
        Throws:
        java.io.IOException - on i/o errors
        com.jcraft.jsch.JSchException - on errors detected by scp