Some documentation on the FileTransfer interface.

This commit is contained in:
Shikhar Bhushan
2012-05-12 16:03:57 +01:00
parent 33969340e2
commit e4d3a1f866

View File

@@ -19,15 +19,53 @@ import java.io.IOException;
public interface FileTransfer { public interface FileTransfer {
/**
* This is meant to delegate to {@link #upload(LocalSourceFile, String)} with the {@code localPath} wrapped as e.g.
* a {@link FileSystemFile}.
*
* @param localPath
* @param remotePath
*
* @throws IOException
*/
void upload(String localPath, String remotePath) void upload(String localPath, String remotePath)
throws IOException; throws IOException;
/**
* This is meant to delegate to {@link #download(String, LocalDestFile)} with the {@code localPath} wrapped as e.g.
* a {@link FileSystemFile}.
*
* @param localPath
* @param remotePath
*
* @throws IOException
*/
void download(String remotePath, String localPath) void download(String remotePath, String localPath)
throws IOException; throws IOException;
/**
* Upload {@code localFile} to {@code remotePath}.
* <p/>
* Attributes will be set on {@code remotePath} based on the {@code localFile}.
*
* @param localFile
* @param remotePath
*
* @throws IOException
*/
void upload(LocalSourceFile localFile, String remotePath) void upload(LocalSourceFile localFile, String remotePath)
throws IOException; throws IOException;
/**
* Download {@code remotePath} to {@code localFile}.
* <p/>
* Attributes will be set on {@code localFile} based on the {@code remotePath}'s attributes.
*
* @param localFile
* @param remotePath
*
* @throws IOException
*/
void download(String remotePath, LocalDestFile localFile) void download(String remotePath, LocalDestFile localFile)
throws IOException; throws IOException;