Transfer files from Unix to Winxp server using Jsch
I'm writing a Java program, to transfer files from Unix server to Windows using the JSch library :) Maybe someone could help me find some example code on how to download a file? I am looking for functions something like these:
Jsch new= Jsch();
new.downloadFilesFromServer(String filename);
new.saveFileLocation(String location) // i mean the righ开发者_如何转开发t function names
I tried the simple JSch example and I can connect to server, complete one operation, and disconnect. So far the only functions I've found in documentation were more-or-less connecting to the server or disconnecting, but not the file download functions, or a JSch full tutorial (if one exists :D ).
Take a look at the ScpFrom jsch example which shows you how to copy a remote file to somewhere local.
精彩评论