com.triangularpixels.rebirth.resources
Class Resources

java.lang.Object
  extended by com.triangularpixels.rebirth.resources.Resources

public class Resources
extends Object

Provides a high-level interface for manipulating resource pools


Nested Class Summary
static class Resources.DecoderGroup
           
 
Constructor Summary
Resources()
           
 
Method Summary
static ResourcePool createPool(String baseDir, Resources.DecoderGroup initialDecoders, boolean enableFileMonitoring, boolean isRestrictiveMode, Object... decoders)
          Creates a new ResourcePool 'baseDir' should be the directory in which all your resource files are within.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Resources

public Resources()
Method Detail

createPool

public static ResourcePool createPool(String baseDir,
                                      Resources.DecoderGroup initialDecoders,
                                      boolean enableFileMonitoring,
                                      boolean isRestrictiveMode,
                                      Object... decoders)
Creates a new ResourcePool 'baseDir' should be the directory in which all your resource files are within. For deployment this can then be turned into a jar on the classpath. 'decoders' can contain static decoder classes and objects with a non-static decode method

Parameters:
baseDir - - the base directory to append to file paths when opening resource files.
initialDecoders - - the group of decoders to initially register
enableFileMonitoring - - whether to start a background thread to look for file modifications
decoders - - additional custom decoders to register
Returns:
the newly created resource pool


Copyright © 2009 TriangularPixels.com. All Rights Reserved.