railo.commons.io.res.type.compress
Class CompressResourceProvider

java.lang.Object
  extended by railo.commons.io.res.type.compress.CompressResourceProvider
All Implemented Interfaces:
Serializable, ResourceProvider, Sizeable
Direct Known Subclasses:
TarResourceProvider, TGZResourceProvider, ZipResourceProvider

public abstract class CompressResourceProvider
extends Object
implements ResourceProvider, Sizeable

See Also:
Serialized Form

Constructor Summary
CompressResourceProvider()
           
 
Method Summary
 Map getArguments()
          returns the arguments defined for this resource
abstract  Compress getCompress(Resource file)
           
 Resource getResource(String path)
          return a resource that match given path
 String getScheme()
          returns the scheme of the resource
 ResourceProvider init(String scheme, boolean caseSensitive, boolean async)
           
 ResourceProvider init(String scheme, Map arguments)
          this class is called by the "Resources" at startup
 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
 
Methods inherited from interface railo.commons.io.res.ResourceProvider
isAttributesSupported, isCaseSensitive, isModeSupported
 

Constructor Detail

CompressResourceProvider

public CompressResourceProvider()
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)

init

public ResourceProvider init(String scheme,
                             boolean caseSensitive,
                             boolean async)

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:
ResourceProvider.getResource(java.lang.String)

getCompress

public abstract Compress getCompress(Resource file)

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:
ResourceProvider.getScheme()

setResources

public void setResources(Resources resources)
Specified by:
setResources in interface ResourceProvider

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)

getArguments

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

Specified by:
getArguments in interface ResourceProvider
Returns:
scheme
See Also:
ResourceProvider.getArguments()

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()


Copyright © 2012 Railo