Class SCPDownloadClient


  • public class SCPDownloadClient
    extends AbstractSCPClient
    Support for downloading files over a connected link using SCP.
    • Field Detail

      • recursiveMode

        private boolean recursiveMode
    • Constructor Detail

      • SCPDownloadClient

        SCPDownloadClient​(SCPEngine engine)
      • SCPDownloadClient

        SCPDownloadClient​(SCPEngine engine,
                          int bandwidthLimit)
    • Method Detail

      • copy

        public int copy​(java.lang.String sourcePath,
                        LocalDestFile targetFile)
                 throws java.io.IOException
        Download a file from sourcePath on the connected host to targetPath locally.
        Throws:
        java.io.IOException
      • getRecursiveMode

        public boolean getRecursiveMode()
      • setRecursiveMode

        public void setRecursiveMode​(boolean recursive)
      • startCopy

        private void startCopy​(LocalDestFile targetFile,
                               ScpCommandLine commandLine)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • parseLong

        private long parseLong​(java.lang.String longString,
                               java.lang.String valType)
                        throws SCPException
        Throws:
        SCPException
      • process

        private boolean process​(TransferListener listener,
                                java.lang.String bufferedTMsg,
                                java.lang.String msg,
                                LocalDestFile f)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • processDirectory

        private void processDirectory​(TransferListener listener,
                                      java.lang.String dMsg,
                                      java.lang.String tMsg,
                                      LocalDestFile f)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • processFile

        private void processFile​(TransferListener listener,
                                 java.lang.String cMsg,
                                 java.lang.String tMsg,
                                 LocalDestFile f)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • setAttributes

        private void setAttributes​(LocalDestFile f,
                                   int perms,
                                   java.lang.String tMsg)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • tokenize

        private static java.util.List<java.lang.String> tokenize​(java.lang.String msg,
                                                                 int totalParts,
                                                                 boolean consolidateTail)
                                                          throws java.io.IOException
        Throws:
        java.io.IOException