Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
What Is examples.ftp.FTPClientExample.java
What is examples.ftp.FTPClientExample.java?
✍: FYIcenter.com
examples.ftp.FTPClientExample.java is an example program demonstrating how to use the FTPClient class provided in the Apache Commons Net library.
examples.ftp.FTPClientExample.java 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).
The syntax of running examples.ftp.FTPClientExample.java is given below:
java examples.ftp.FTPClientExample [options] <hostname> <username> <password> [<remote file> [<local file>]] Default behavior is to download a file and use ASCII transfer mode. Options: -a - use local active mode (default is local passive) -A - anonymous login (omit username and password parameters) -b - use binary transfer mode -c cmd - issue arbitrary command (remote is used as a parameter if provided) -d - list directory details using MLSD (remote is used as the pathname if provided) -e - use EPSV with IPv4 (default false) -E - encoding to use for control channel -f - issue FEAT command (remote and local files are ignored) -h - list hidden files (applies to -l and -n only) -k secs - use keep-alive timer (setControlKeepAliveTimeout) -l - list files using LIST (remote is used as the pathname if provided) Files are listed twice: first in raw mode, then as the formatted parsed data. N.B. if the wrong server-type is used, output may be lost. Use -U or -S as necessary. -L - use lenient future dates (server dates may be up to 1 day into future) -m - list file details using MDTM (remote is used as the pathname if provided) -n - list file names using NLST (remote is used as the pathname if provided) -p true|false|protocol[,true|false] - use FTPSClient with the specified protocol and/or isImplicit setting -s - store file on server (upload) -S - systemType set server system type (e.g. UNIX VMS WINDOWS) -t - list file details using MLST (remote is used as the pathname if provided) -U - save unparseable responses -w msec - wait time for keep-alive reply (setControlKeepAliveReplyTimeout) -T all|valid|none - use one of the built-in TrustManager implementations (none = JVM default) -y format - set default date format string -Y format - set recent date format string -Z timezone - set the server timezone for parsing LIST responses -z timezone - set the timezone for displaying MDTM, LIST, MLSD, MLST responses -PrH server[:port] - HTTP Proxy host and optional port[80] -PrU user - HTTP Proxy server username -PrP password - HTTP Proxy server password -# - add hash display during transfers
⇒ Run examples.ftp.FTPClientExample.java
⇐ What Is commons-net-examples.jar
2017-05-12, 2710🔥, 0💬
Popular Posts:
Apache Commons Codec library provides implementations of common encoders and decoders such as Base64...
Apache Log4j Core Implementation provides the functional components of the logging system. Users are...
The JMX technology provides the tools for building distributed, Web-based, modular and dynamic solut...
JasperReports, the world's most popular open source business intelligence and reporting engine and J...
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.5.0-src.zip...