Class SCPUploadClient
java.lang.Object
net.schmizz.sshj.xfer.scp.AbstractSCPClient
net.schmizz.sshj.xfer.scp.SCPUploadClient
Support for uploading files over a connected link using SCP.
-
Field Summary
FieldsFields inherited from class AbstractSCPClient
bandwidthLimit, engine -
Constructor Summary
ConstructorsConstructorDescriptionSCPUploadClient(SCPEngine engine) SCPUploadClient(SCPEngine engine, int bandwidthLimit) -
Method Summary
Modifier and TypeMethodDescriptionintcopy(LocalSourceFile sourceFile, String remotePath) Upload a local file fromlocalFiletotargetPathon the remote host.intcopy(LocalSourceFile sourceFile, String remotePath, ScpCommandLine.EscapeMode escapeMode) intcopy(LocalSourceFile sourceFile, String remotePath, ScpCommandLine.EscapeMode escapeMode, boolean preserveTimes) intcopy(LocalSourceFile sourceFile, String remotePath, ScpCommandLine.EscapeMode escapeMode, ScpCommandLine commandLine) private Stringprivate voidprivate voidprocess(TransferListener listener, LocalSourceFile f, boolean preserveTimes) private voidsendDirectory(TransferListener listener, LocalSourceFile f, boolean preserveTimes) private voidsendFile(StreamCopier.Listener listener, LocalSourceFile f, boolean preserveTimes) voidsetUploadFilter(LocalFileFilter uploadFilter) private voidstartCopy(LocalSourceFile sourceFile, ScpCommandLine commandLine)
-
Field Details
-
uploadFilter
-
-
Constructor Details
-
Method Details
-
copy
Upload a local file fromlocalFiletotargetPathon the remote host.- Throws:
IOException
-
copy
public int copy(LocalSourceFile sourceFile, String remotePath, ScpCommandLine.EscapeMode escapeMode) throws IOException - Throws:
IOException
-
copy
public int copy(LocalSourceFile sourceFile, String remotePath, ScpCommandLine.EscapeMode escapeMode, boolean preserveTimes) throws IOException - Throws:
IOException
-
copy
public int copy(LocalSourceFile sourceFile, String remotePath, ScpCommandLine.EscapeMode escapeMode, ScpCommandLine commandLine) throws IOException - Throws:
IOException
-
setUploadFilter
-
startCopy
- Throws:
IOException
-
process
private void process(TransferListener listener, LocalSourceFile f, boolean preserveTimes) throws IOException - Throws:
IOException
-
sendDirectory
private void sendDirectory(TransferListener listener, LocalSourceFile f, boolean preserveTimes) throws IOException - Throws:
IOException
-
sendFile
private void sendFile(StreamCopier.Listener listener, LocalSourceFile f, boolean preserveTimes) throws IOException - Throws:
IOException
-
preserveTimeIfPossible
- Throws:
IOException
-
getPermString
- Throws:
IOException
-