FTP/SSL Tutorial

Table of content

Zehon FTP/SSL for Java is a versatile file-transfer component for Java language. It
enables you to transfer or download files directly from/to your application
using FTP/SSL. It can be used in a rich client application or in a web
container.

File transfers are an essential part of the FTP/SSL protocol and can be achieved using
the sendFile and getFile methods. They accept the path
to the local file and the path to the remote file (both paths must include the filename)
and return the status of the transfer. Please
prefer to the JavaDoc for more information.

Working with directories (folders) on the FTP/SSL server is simple. The remote filesystem
is organized in the same way as in Un*x. If you are used to Windows, watch out for
the two differencies - a slash (/) is used instead of a backslash,
and there is only a single root at "/", no drive letters. A typical path to a file
might look like "/pub/incoming/test.zip", for example.

Upload or download of multiple files is a very common task. There are getFolder
and sendFolder methods that can be used to transfer multiple files easily
- just provide the source path (which can be a directory or contain wildcards),
destination path and transfer options.

When transferring lots of files, things can occasionally go wrong due to unforeseen
problems - to be informed about such errors, use BatchTransferProgress
event that also makes it possible to select the desired next action. To stay informed
about what is currently going on, use the BatchTransferProgress event.

For more information about these events, check out the
BatchTransfer sample application!