public class FileCacher
extends java.lang.Object
| Constructor and Description |
|---|
FileCacher() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAuthenticator(URIxMatcher matcher,
org.apache.commons.vfs2.UserAuthenticator auth) |
void |
addIdentityRepository(URIxMatcher matcher,
SimpleIdentityRepository repo) |
java.io.File |
cache(URIx uri,
java.io.File cacheFile) |
java.io.File |
cache(URIx uri,
java.io.File cacheFile,
FileTransferMonitor monitor) |
java.io.File |
cache(URIx uri,
java.lang.String cachePath) |
boolean |
copy(java.io.File from,
URIx to) |
boolean |
copy(java.io.File from,
URIx to,
FileTransferMonitor monitor) |
boolean |
copy(URIx from,
URIx to) |
boolean |
copy(URIx from,
URIx to,
FileTransferMonitor monitor) |
boolean |
exists(URIx uri) |
long |
getFileSize(java.io.File file) |
long |
getFileSize(URIx uri)
Returns the size of the specified file
|
java.io.InputStream |
getInputStream(URIx uri) |
java.io.OutputStream |
getOutputStream(URIx uri) |
void |
initialize() |
void |
release() |
static void |
setAuthenticator(org.apache.commons.vfs2.FileSystemOptions opts,
org.apache.commons.vfs2.UserAuthenticator auth) |
static void |
setDefaultFsOptions(org.apache.commons.vfs2.FileSystemOptions opts) |
static void |
setIdentityFactory(org.apache.commons.vfs2.FileSystemOptions opts,
org.apache.commons.vfs2.provider.sftp.IdentityRepositoryFactory factory) |
public void initialize()
throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionpublic void release()
public void addAuthenticator(URIxMatcher matcher, org.apache.commons.vfs2.UserAuthenticator auth)
public void addIdentityRepository(URIxMatcher matcher, SimpleIdentityRepository repo)
public static void setDefaultFsOptions(org.apache.commons.vfs2.FileSystemOptions opts)
throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionpublic static void setAuthenticator(org.apache.commons.vfs2.FileSystemOptions opts,
org.apache.commons.vfs2.UserAuthenticator auth)
throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionpublic static void setIdentityFactory(org.apache.commons.vfs2.FileSystemOptions opts,
org.apache.commons.vfs2.provider.sftp.IdentityRepositoryFactory factory)
throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionpublic java.io.File cache(URIx uri, java.lang.String cachePath) throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionpublic long getFileSize(URIx uri)
public long getFileSize(java.io.File file)
public java.io.File cache(URIx uri, java.io.File cacheFile) throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionpublic boolean exists(URIx uri) throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionpublic java.io.File cache(URIx uri, java.io.File cacheFile, FileTransferMonitor monitor) throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionpublic boolean copy(java.io.File from,
URIx to,
FileTransferMonitor monitor)
throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionpublic boolean copy(java.io.File from,
URIx to)
throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionpublic boolean copy(URIx from, URIx to) throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionpublic boolean copy(URIx from, URIx to, FileTransferMonitor monitor) throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionpublic java.io.InputStream getInputStream(URIx uri) throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionpublic java.io.OutputStream getOutputStream(URIx uri) throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemException