org.das2.util.filesystem.FileSystemSettings
controls for file systems.
PROP_LOCALCACHEDIR
setting for the location of where the local cache is kept.
PROP_PERSISTENCE
setting for how long files should be kept and using in the cache.
PROP_ALLOWOFFLINE
allow use of persistent, cached files when the file system is not accessible.
FileSystem implementations will throw FileNotFound exception when remote
resources are not available, and FileSystemOfflineExceptions are not
thrown.
PROP_OFFLINE
addPropertyChangeListener
addPropertyChangeListener( java.beans.PropertyChangeListener listener ) → void
Parameters
listener - a PropertyChangeListener
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
addPropertyChangeListener( String propertyName, java.beans.PropertyChangeListener listener ) → void [view source]
getConnectTimeoutMs
getConnectTimeoutMs( ) → int
return the connection timeout in milliseconds.
Returns:
the connection timeout in milliseconds.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getLocalCacheDir
getLocalCacheDir( ) → java.io.File
setting for the location of where the local cache is kept.
Returns:
File that is the local cache directory.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getPersistence
getPersistence( ) → org.das2.util.filesystem.FileSystemSettings.Persistence
get the setting for how long files should be kept and using in the cache,
e.g. Persistence.SESSION means during the session.
Returns:
the setting
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getReadTimeoutMs
getReadTimeoutMs( ) → int
return the read timeout in milliseconds.
Returns:
an int
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getTemporaryFileTimeoutSeconds
getTemporaryFileTimeoutSeconds( ) → int
return the number of seconds that an unused temporary file will
be left on the system before it may be deleted. This presumes
that the code can determine if a temporary file is in use, which is
not really the case.
Returns:
the number of seconds.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
hasAllPermission
hasAllPermission( ) → boolean
check the security manager to see if all permissions are allowed,
True indicates is not an applet running in a sandbox.
copy of DasAppliction.hasAllPermission
Returns:
true if all permissions are allowed
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
isAllowOffline
isAllowOffline( ) → boolean
Returns:
boolean
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
isOffline
isOffline( ) → boolean
true indicate file system is offline and cached files should be used.
Returns:
a boolean
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
removePropertyChangeListener
removePropertyChangeListener( java.beans.PropertyChangeListener listener ) → void
Parameters
listener - a PropertyChangeListener
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
removePropertyChangeListener( String propertyName, java.beans.PropertyChangeListener listener ) → void [view source]
setAllowOffline
setAllowOffline( boolean allowOffline ) → void
Parameters
allowOffline - a boolean
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setConnectTimeoutMs
setConnectTimeoutMs( int millis ) → void
reset the connect timeout. Setting to
0 or a negative number will reset it to the
default of 5000ms.
Parameters
millis - an int
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setLocalCacheDir
setLocalCacheDir( java.io.File localCacheDir ) → void
Parameters
localCacheDir - a File
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setOffline
setOffline( boolean offline ) → void
If true, then force the filesystems to be offline. If false, then use each filesystem's status.
FileSystem.reset() should be called after this.
Parameters
offline - a boolean
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setPersistence
setPersistence( org.das2.util.filesystem.FileSystemSettings.Persistence persistence ) → void
Parameters
persistence - a FileSystemSettings.Persistence
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setReadTimeoutMs
setReadTimeoutMs( int millis ) → void
reset the time read timeout. Setting to
0 or a negative number will reset it to the
default of 60000ms.
Parameters
millis - number of milliseconds
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setRestrictPermission
setRestrictPermission( boolean v ) → void
true means don't attempt to gain access to applet-restricted functions.
Parameters
v - true means don't attempt to gain access to applet-restricted functions.
Returns:
void (returns nothing)
See Also:
org.das2.DasApplication#setRestrictPermission
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]