public class SFTPRepository extends AbstractSshBasedRepository
| Constructor and Description |
|---|
SFTPRepository() |
| Modifier and Type | Method and Description |
|---|---|
void |
get(java.lang.String source,
java.io.File destination)
Fetch a resource from the repository.
|
protected java.lang.String |
getRepositoryScheme() |
Resource |
getResource(java.lang.String source)
Return the resource associated with a specified identifier.
|
java.util.List |
list(java.lang.String parent)
Return a listing of resources names
|
java.io.InputStream |
openStream(SFTPResource resource) |
void |
put(java.io.File source,
java.lang.String destination,
boolean overwrite) |
Resource |
resolveResource(java.lang.String path)
This method is similar to getResource, except that the returned resource is fully initialized
(resolved in the sftp repository), and that the given string is a full remote path
|
getHost, getKeyFile, getKeyFilePassword, getPassFile, getPort, getSession, getUser, getUserPassword, isAllowedAgentUse, releaseSession, setAllowedAgentUse, setHost, setKeyFile, setKeyFilePassword, setPassFile, setPort, setUser, setUserPasswordaddTransferListener, fireTransferCompleted, fireTransferCompleted, fireTransferError, fireTransferError, fireTransferEvent, fireTransferInitiated, fireTransferProgress, fireTransferStarted, fireTransferStarted, getFileSeparator, getName, hasTransferListener, put, removeTransferListener, setName, standardize, toStringpublic Resource getResource(java.lang.String source)
Repositorysource - A string identifying the resource.public Resource resolveResource(java.lang.String path)
path - the full remote path in the repository of the resourcepublic java.io.InputStream openStream(SFTPResource resource) throws java.io.IOException
java.io.IOExceptionpublic void get(java.lang.String source,
java.io.File destination)
throws java.io.IOException
Repositorysource - A string identifying the resource to be fetched.destination - Where to place the fetched resource.java.io.IOException - On retrieval failure.public void put(java.io.File source,
java.lang.String destination,
boolean overwrite)
throws java.io.IOException
put in class AbstractRepositoryjava.io.IOExceptionpublic java.util.List list(java.lang.String parent)
throws java.io.IOException
Repositoryparent - The parent directory from which to generate the listing.java.io.IOException - On listing failure.protected java.lang.String getRepositoryScheme()
getRepositoryScheme in class AbstractSshBasedRepository