railo.commons.io.res.type.file
Class FileResourceProvider

java.lang.Object
  extended by railo.commons.io.res.type.file.FileResourceProvider
All Implemented Interfaces:
Serializable, ResourceProvider, Sizeable

public final class FileResourceProvider
extends Object
implements ResourceProvider, Sizeable

See Also:
Serialized Form

Constructor Summary
FileResourceProvider()
          Constructor of the class
 
Method Summary
 Map getArguments()
          returns the arguments defined for this resource
 Resource getResource(String path)
          return a resource that match given path
 String getScheme()
          returns the scheme of the resource
 ResourceProvider init(String scheme, Map arguments)
          this class is called by the "Resources" at startup
 boolean isAttributesSupported()
          returns if the resource support attributes for his resources
 boolean isCaseSensitive()
          returns if the resources of the provider are case-sensitive or not
 boolean isModeSupported()
          returns if the resource support mode for his resources
 void lock(Resource res)
           
 void read(Resource res)
           
 void setResources(Resources resources)
           
 long sizeOf()
          return the size of the object
 void unlock(Resource res)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileResourceProvider

public FileResourceProvider()
Constructor of the class

Method Detail

init

public ResourceProvider init(String scheme,
                             Map arguments)
Description copied from interface: ResourceProvider
this class is called by the "Resources" at startup

Specified by:
init in interface ResourceProvider
Parameters:
scheme - of the provider (can be "null")
arguments - initals argument (can be "null")
See Also:
ResourceProvider.init(java.lang.String, java.util.Map)

getResource

public Resource getResource(String path)
Description copied from interface: ResourceProvider
return a resource that match given path

Specified by:
getResource in interface ResourceProvider
Returns:
matching resource to path
See Also:
res.ResourceProvider#getResource(java.lang.String)

getScheme

public String getScheme()
Description copied from interface: ResourceProvider
returns the scheme of the resource

Specified by:
getScheme in interface ResourceProvider
Returns:
scheme
See Also:
res.ResourceProvider#getScheme()

setResources

public void setResources(Resources resources)
Specified by:
setResources in interface ResourceProvider
See Also:
ResourceProvider.setResources(railo.commons.io.res.Resources)

lock

public void lock(Resource res)
          throws IOException
Specified by:
lock in interface ResourceProvider
Throws:
IOException
See Also:
ResourceProvider.lock(railo.commons.io.res.Resource)

unlock

public void unlock(Resource res)
Specified by:
unlock in interface ResourceProvider
See Also:
ResourceProvider.unlock(railo.commons.io.res.Resource)

read

public void read(Resource res)
          throws IOException
Specified by:
read in interface ResourceProvider
Throws:
IOException
See Also:
ResourceProvider.read(railo.commons.io.res.Resource)

isAttributesSupported

public boolean isAttributesSupported()
Description copied from interface: ResourceProvider
returns if the resource support attributes for his resources

Specified by:
isAttributesSupported in interface ResourceProvider
Returns:
is attributes supported or not
See Also:
ResourceProvider.isAttributesSupported()

isCaseSensitive

public boolean isCaseSensitive()
Description copied from interface: ResourceProvider
returns if the resources of the provider are case-sensitive or not

Specified by:
isCaseSensitive in interface ResourceProvider
Returns:
is resource case-sensitive or not
See Also:
ResourceProvider.isCaseSensitive()

isModeSupported

public boolean isModeSupported()
Description copied from interface: ResourceProvider
returns if the resource support mode for his resources

Specified by:
isModeSupported in interface ResourceProvider
Returns:
is mode supported or not
See Also:
ResourceProvider.isModeSupported()

sizeOf

public long sizeOf()
Description copied from interface: Sizeable
return the size of the object

Specified by:
sizeOf in interface Sizeable
Returns:
size of the object
See Also:
Sizeable.sizeOf()

getArguments

public Map getArguments()
Description copied from interface: ResourceProvider
returns the arguments defined for this resource

Specified by:
getArguments in interface ResourceProvider
Returns:
scheme


Copyright © 2012 Railo