Class FTPClientExample
- java.lang.Object
-
- org.apache.commons.net.examples.ftp.FTPClientExample
-
public final class FTPClientExample extends java.lang.Object
This is an example program demonstrating how to use the FTPClient class. This program connects to an FTP server and retrieves the specified file. If the -s flag is used, it stores the local file at the FTP server. Just so you can see what's happening, all reply strings are printed. If the -b flag is used, a binary transfer is assumed (default is ASCII). See below for further options.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
USAGE
-
Constructor Summary
Constructors Constructor Description FTPClientExample()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static CopyStreamListener
createListener()
static void
main(java.lang.String[] args)
private static void
showCslStats(FTPClient ftp)
-
-
-
Field Detail
-
USAGE
public static final java.lang.String USAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
createListener
private static CopyStreamListener createListener()
-
main
public static void main(java.lang.String[] args) throws java.net.UnknownHostException
- Throws:
java.net.UnknownHostException
-
showCslStats
private static void showCslStats(FTPClient ftp)
-
-