Class SCPDownloadClient
java.lang.Object
net.schmizz.sshj.xfer.scp.AbstractSCPClient
net.schmizz.sshj.xfer.scp.SCPDownloadClient
Support for downloading files over a connected link using SCP.
-
Field Summary
FieldsFields inherited from class AbstractSCPClient
bandwidthLimit, engine -
Constructor Summary
ConstructorsConstructorDescriptionSCPDownloadClient(SCPEngine engine) SCPDownloadClient(SCPEngine engine, int bandwidthLimit) -
Method Summary
Modifier and TypeMethodDescriptionintcopy(String sourcePath, LocalDestFile targetFile) Download a file fromsourcePathon the connected host totargetPathlocally.intcopy(String sourcePath, LocalDestFile targetFile, ScpCommandLine.EscapeMode escapeMode) intcopy(String sourcePath, LocalDestFile targetFile, ScpCommandLine.EscapeMode escapeMode, ScpCommandLine commandLine) booleanprivate longprivate intparsePermissions(String cmd) private booleanprocess(TransferListener listener, String bufferedTMsg, String msg, LocalDestFile f) private voidprocessDirectory(TransferListener listener, String dMsg, String tMsg, LocalDestFile f) private voidprocessFile(TransferListener listener, String cMsg, String tMsg, LocalDestFile f) private voidsetAttributes(LocalDestFile f, int perms, String tMsg) voidsetRecursiveMode(boolean recursive) private voidstartCopy(LocalDestFile targetFile, ScpCommandLine commandLine)
-
Field Details
-
recursiveMode
private boolean recursiveMode
-
-
Constructor Details
-
Method Details
-
copy
Download a file fromsourcePathon the connected host totargetPathlocally.- Throws:
IOException
-
copy
public int copy(String sourcePath, LocalDestFile targetFile, ScpCommandLine.EscapeMode escapeMode) throws IOException - Throws:
IOException
-
copy
public int copy(String sourcePath, LocalDestFile targetFile, ScpCommandLine.EscapeMode escapeMode, ScpCommandLine commandLine) throws IOException - Throws:
IOException
-
getRecursiveMode
public boolean getRecursiveMode() -
setRecursiveMode
public void setRecursiveMode(boolean recursive) -
startCopy
- Throws:
IOException
-
parseLong
- Throws:
SCPException
-
parsePermissions
- Throws:
SCPException
-
process
private boolean process(TransferListener listener, String bufferedTMsg, String msg, LocalDestFile f) throws IOException - Throws:
IOException
-
processDirectory
private void processDirectory(TransferListener listener, String dMsg, String tMsg, LocalDestFile f) throws IOException - Throws:
IOException
-
processFile
private void processFile(TransferListener listener, String cMsg, String tMsg, LocalDestFile f) throws IOException - Throws:
IOException
-
setAttributes
- Throws:
IOException
-
tokenize
private static List<String> tokenize(String msg, int totalParts, boolean consolidateTail) throws IOException - Throws:
IOException
-