com.metaio.tools.io
Class AssetsManager

java.lang.Object
  extended by com.metaio.tools.io.AssetsManager

public final class AssetsManager
extends Object


Constructor Summary
AssetsManager()
           
 
Method Summary
static void extractAllAssets(Context context, boolean override)
          Extract all assets to internal memory
static void extractAllAssets(Context context, String parentPath, boolean override)
          Extract all assets to internal memory
static String getAssetPath(String filename)
          Get extracted asset file path.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetsManager

public AssetsManager()
Method Detail

extractAllAssets

public static void extractAllAssets(Context context,
                                    boolean override)
                             throws IOException
Extract all assets to internal memory

Parameters:
context - Application context
override - override existing files
Throws:
IOException

extractAllAssets

public static void extractAllAssets(Context context,
                                    String parentPath,
                                    boolean override)
                             throws IOException
Extract all assets to internal memory

Parameters:
context - Application context
parentPath - Parent path of the directory which should be extracted, pass empty string to extract all assets
override - override existing files
Throws:
IOException

getAssetPath

public static String getAssetPath(String filename)
Get extracted asset file path.

Parameters:
filename - file or directory name
Returns:
File path or null if does not exists or assets are not extracted