|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.myJava.file.driver.AbstractFileSystemDriver
com.myJava.file.driver.remote.AbstractRemoteFileSystemDriver
public abstract class AbstractRemoteFileSystemDriver
Field Summary | |
---|---|
protected java.util.ArrayList |
alternateProxies
|
protected static int |
BUFFER_SIZE
|
protected java.util.Map |
localInputFiles
|
protected java.io.File |
localRootDirectory
|
protected int |
maxProxies
|
protected AbstractProxy |
proxy
|
protected java.lang.String |
strLocalRootDirectory
|
protected static boolean |
USE_BUFFER
|
Fields inherited from class com.myJava.file.driver.AbstractFileSystemDriver |
---|
CHECK_PATH |
Fields inherited from interface com.myJava.file.driver.FileSystemDriver |
---|
ACCESS_EFFICIENCY_AVERAGE, ACCESS_EFFICIENCY_GOOD, ACCESS_EFFICIENCY_POOR |
Constructor Summary | |
---|---|
AbstractRemoteFileSystemDriver(java.io.File localRootDirectory)
|
Method Summary | |
---|---|
protected java.lang.String |
buildNewOwnerId(java.lang.String role)
|
boolean |
canRead(java.io.File file)
|
boolean |
canWrite(java.io.File file)
|
boolean |
createNewFile(java.io.File file)
|
boolean |
delete(java.io.File file)
|
boolean |
directFileAccessSupported()
|
protected void |
disconnect()
|
boolean |
exists(java.io.File file)
|
void |
flush()
|
java.io.File |
getAbsoluteFile(java.io.File file)
|
java.lang.String |
getAbsolutePath(java.io.File file)
|
short |
getAccessEfficiency()
Tells whether accesses are fast or not |
protected AbstractProxy |
getAvailableProxy(java.lang.String owner)
|
java.io.InputStream |
getCachedFileInputStream(java.io.File file)
Ensures that a local copy of the file exists and return an InputStream on this file |
java.io.OutputStream |
getCachedFileOutputStream(java.io.File file)
Returns an OutputStream for the given File This outputStream will be cached, and written only during call to "flush" |
java.io.File |
getCanonicalFile(java.io.File file)
|
java.lang.String |
getCanonicalPath(java.io.File file)
|
protected FictiveFile |
getFictiveLocalFile(java.io.File file)
|
java.io.InputStream |
getFileInputStream(java.io.File file)
|
java.io.OutputStream |
getFileOutputStream(java.io.File file)
|
java.io.OutputStream |
getFileOutputStream(java.io.File file,
boolean append)
|
java.io.OutputStream |
getFileOutputStream(java.io.File file,
boolean append,
OutputStreamListener listener)
|
FileCacheableInformations |
getInformations(java.io.File file)
Returns a global set of file informations (length, lastmodified, ...) |
java.lang.String |
getName(java.io.File file)
|
protected java.lang.String |
getNormalizedLocalRoot()
|
java.lang.String |
getParent(java.io.File file)
|
java.io.File |
getParentFile(java.io.File file)
|
java.lang.String |
getPath(java.io.File file)
|
protected void |
initFictiveLocalFile(FictiveFile file)
|
boolean |
isAbsolute(java.io.File file)
|
boolean |
isContentSensitive()
Returns true if the driver is sensitive to the content. |
boolean |
isDirectory(java.io.File file)
|
boolean |
isFile(java.io.File file)
|
long |
lastModified(java.io.File file)
|
long |
length(java.io.File file)
|
java.lang.String[] |
list(java.io.File file)
|
java.lang.String[] |
list(java.io.File file,
java.io.FilenameFilter filter)
|
java.io.File[] |
listFiles(java.io.File file)
|
java.io.File[] |
listFiles(java.io.File file,
java.io.FileFilter filter)
|
java.io.File[] |
listFiles(java.io.File file,
java.io.FilenameFilter filter)
|
boolean |
mkdir(java.io.File file)
|
void |
mount()
|
protected void |
releaseProxy(AbstractProxy proxy,
java.lang.String owner)
|
protected void |
removeLocalInputFile(java.io.File file)
|
boolean |
renameTo(java.io.File source,
java.io.File dest)
|
boolean |
supportsLongFileNames()
|
protected abstract java.lang.String |
translateToLocal(java.lang.String remoteFile)
|
protected abstract java.lang.String |
translateToRemote(java.io.File localFile)
|
void |
unmount()
|
Methods inherited from class com.myJava.file.driver.AbstractFileSystemDriver |
---|
applyMetaData, checkFilePath, createSymbolicLink, deleteOnExit, getMetaData, isHidden, mkdirs, normalizeIfNeeded, setLastModified, setReadOnly |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.File localRootDirectory
protected java.lang.String strLocalRootDirectory
protected static boolean USE_BUFFER
protected static int BUFFER_SIZE
protected java.util.Map localInputFiles
protected AbstractProxy proxy
protected int maxProxies
protected java.util.ArrayList alternateProxies
Constructor Detail |
---|
public AbstractRemoteFileSystemDriver(java.io.File localRootDirectory)
Method Detail |
---|
protected abstract java.lang.String translateToLocal(java.lang.String remoteFile)
protected abstract java.lang.String translateToRemote(java.io.File localFile)
protected java.lang.String getNormalizedLocalRoot()
public boolean createNewFile(java.io.File file) throws java.io.IOException
createNewFile
in interface FileSystemDriver
createNewFile
in class AbstractFileSystemDriver
java.io.IOException
public long length(java.io.File file)
length
in interface FileSystemDriver
length
in class AbstractFileSystemDriver
public long lastModified(java.io.File file)
lastModified
in interface FileSystemDriver
lastModified
in class AbstractFileSystemDriver
public boolean isDirectory(java.io.File file)
isDirectory
in interface FileSystemDriver
isDirectory
in class AbstractFileSystemDriver
public boolean exists(java.io.File file)
exists
in interface FileSystemDriver
exists
in class AbstractFileSystemDriver
protected FictiveFile getFictiveLocalFile(java.io.File file)
protected void initFictiveLocalFile(FictiveFile file)
protected AbstractProxy getAvailableProxy(java.lang.String owner)
protected void releaseProxy(AbstractProxy proxy, java.lang.String owner)
public java.io.OutputStream getCachedFileOutputStream(java.io.File file) throws java.io.IOException
FileSystemDriver
java.io.IOException
public short getAccessEfficiency()
FileSystemDriver
public boolean canRead(java.io.File file)
public boolean canWrite(java.io.File file)
public boolean supportsLongFileNames()
public boolean isFile(java.io.File file)
isFile
in interface FileSystemDriver
isFile
in class AbstractFileSystemDriver
public java.io.File getAbsoluteFile(java.io.File file)
getAbsoluteFile
in interface FileSystemDriver
getAbsoluteFile
in class AbstractFileSystemDriver
public java.lang.String getAbsolutePath(java.io.File file)
getAbsolutePath
in interface FileSystemDriver
getAbsolutePath
in class AbstractFileSystemDriver
public java.io.File getCanonicalFile(java.io.File file) throws java.io.IOException
getCanonicalFile
in interface FileSystemDriver
getCanonicalFile
in class AbstractFileSystemDriver
java.io.IOException
public java.lang.String getCanonicalPath(java.io.File file) throws java.io.IOException
getCanonicalPath
in interface FileSystemDriver
getCanonicalPath
in class AbstractFileSystemDriver
java.io.IOException
public java.lang.String getName(java.io.File file)
getName
in interface FileSystemDriver
getName
in class AbstractFileSystemDriver
public java.lang.String getParent(java.io.File file)
getParent
in interface FileSystemDriver
getParent
in class AbstractFileSystemDriver
public java.io.File getParentFile(java.io.File file)
getParentFile
in interface FileSystemDriver
getParentFile
in class AbstractFileSystemDriver
public java.lang.String getPath(java.io.File file)
getPath
in interface FileSystemDriver
getPath
in class AbstractFileSystemDriver
public boolean isAbsolute(java.io.File file)
isAbsolute
in interface FileSystemDriver
isAbsolute
in class AbstractFileSystemDriver
public java.lang.String[] list(java.io.File file, java.io.FilenameFilter filter)
list
in interface FileSystemDriver
list
in class AbstractFileSystemDriver
public java.lang.String[] list(java.io.File file)
list
in interface FileSystemDriver
list
in class AbstractFileSystemDriver
public java.io.File[] listFiles(java.io.File file, java.io.FileFilter filter)
listFiles
in interface FileSystemDriver
listFiles
in class AbstractFileSystemDriver
public java.io.File[] listFiles(java.io.File file, java.io.FilenameFilter filter)
listFiles
in interface FileSystemDriver
listFiles
in class AbstractFileSystemDriver
public boolean directFileAccessSupported()
protected void removeLocalInputFile(java.io.File file)
public java.io.InputStream getCachedFileInputStream(java.io.File file) throws java.io.IOException
FileSystemDriver
java.io.IOException
public void mount() throws java.io.IOException
java.io.IOException
public void unmount() throws java.io.IOException
java.io.IOException
protected void disconnect()
public void flush() throws java.io.IOException
java.io.IOException
protected java.lang.String buildNewOwnerId(java.lang.String role)
public java.io.OutputStream getFileOutputStream(java.io.File file, boolean append, OutputStreamListener listener) throws java.io.IOException
java.io.IOException
public java.io.OutputStream getFileOutputStream(java.io.File file) throws java.io.IOException
java.io.IOException
public FileCacheableInformations getInformations(java.io.File file)
FileSystemDriver
public boolean isContentSensitive()
FileSystemDriver
public boolean delete(java.io.File file)
delete
in interface FileSystemDriver
delete
in class AbstractFileSystemDriver
public boolean mkdir(java.io.File file)
mkdir
in interface FileSystemDriver
mkdir
in class AbstractFileSystemDriver
public boolean renameTo(java.io.File source, java.io.File dest)
renameTo
in interface FileSystemDriver
renameTo
in class AbstractFileSystemDriver
public java.io.File[] listFiles(java.io.File file)
listFiles
in interface FileSystemDriver
listFiles
in class AbstractFileSystemDriver
public java.io.OutputStream getFileOutputStream(java.io.File file, boolean append) throws java.io.IOException
java.io.IOException
public java.io.InputStream getFileInputStream(java.io.File file) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |