Class RamFileSystemConfigBuilder
- java.lang.Object
-
- org.apache.commons.vfs2.FileSystemConfigBuilder
-
- org.apache.commons.vfs2.provider.ram.RamFileSystemConfigBuilder
-
public final class RamFileSystemConfigBuilder extends FileSystemConfigBuilder
Config Builder for the RAM file system.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
MAX_SIZE_KEY
max size key.private static RamFileSystemConfigBuilder
SINGLETON
config builder SINGLETON.
-
Constructor Summary
Constructors Modifier Constructor Description private
RamFileSystemConfigBuilder()
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected java.lang.Class<? extends FileSystem>
getConfigClass()
Gets the target of this configuration.static RamFileSystemConfigBuilder
getInstance()
Gets the singleton builder.long
getLongMaxSize(FileSystemOptions opts)
Defaults toInteger.MAX_VALUE
.int
getMaxSize(FileSystemOptions opts)
Defaults toInteger.MAX_VALUE
.void
setMaxSize(FileSystemOptions opts, int sizeInBytes)
Deprecated.void
setMaxSize(FileSystemOptions opts, long sizeInBytes)
Sets the maximum size of the file system.-
Methods inherited from class org.apache.commons.vfs2.FileSystemConfigBuilder
getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCharacter, getCharacter, getCharacter, getDouble, getDouble, getDouble, getDuration, getDuration, getDurationInteger, getDurationInteger, getEnum, getEnum, getFloat, getFloat, getFloat, getInteger, getInteger, getInteger, getLong, getLong, getLong, getParam, getRootURI, getShort, getShort, getShort, getString, getString, hasObject, hasParam, setParam, setParam, setRootURI, toBooleanObject
-
-
-
-
Field Detail
-
MAX_SIZE_KEY
private static final java.lang.String MAX_SIZE_KEY
max size key.- See Also:
- Constant Field Values
-
SINGLETON
private static final RamFileSystemConfigBuilder SINGLETON
config builder SINGLETON.
-
-
Method Detail
-
getInstance
public static RamFileSystemConfigBuilder getInstance()
Gets the singleton builder.- Returns:
- the singleton builder.
-
getConfigClass
protected java.lang.Class<? extends FileSystem> getConfigClass()
Gets the target of this configuration.- Specified by:
getConfigClass
in classFileSystemConfigBuilder
- Returns:
- the specific file system class
-
getLongMaxSize
public long getLongMaxSize(FileSystemOptions opts)
Defaults toInteger.MAX_VALUE
.- Parameters:
opts
- The FileSystem options.- Returns:
- The maximum size of the file.
- Since:
- 2.1
- See Also:
setMaxSize(FileSystemOptions, long)
-
getMaxSize
public int getMaxSize(FileSystemOptions opts)
Defaults toInteger.MAX_VALUE
.- Parameters:
opts
- The FileSystem options.- Returns:
- The maximum size of the file. The next major version will change the return type to a long.
- See Also:
setMaxSize(FileSystemOptions, int)
-
setMaxSize
@Deprecated public void setMaxSize(FileSystemOptions opts, int sizeInBytes)
Deprecated.Sets the maximum size of the file system.- Parameters:
opts
- The FileSystem options.sizeInBytes
- The maximum file size.
-
setMaxSize
public void setMaxSize(FileSystemOptions opts, long sizeInBytes)
Sets the maximum size of the file system.- Parameters:
opts
- The FileSystem options.sizeInBytes
- The maximum file size.
-
-