public static enum PropertiesLoader.FileLocation extends Enum<PropertiesLoader.FileLocation>
| Enum Constant and Description |
|---|
ASSETS
"assets" folder. |
CLASSPATH
Classpath.
|
FILESYSTEM
File system.
|
RAW
"res/raw" folder. |
| Modifier and Type | Method and Description |
|---|---|
static PropertiesLoader.FileLocation |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PropertiesLoader.FileLocation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PropertiesLoader.FileLocation FILESYSTEM
The file is opened by Context.openFileInput(file).
public static final PropertiesLoader.FileLocation CLASSPATH
The file is opened by PropertiesLoader.class.getResourceAsString(file).
If the file name given to a load method does not
start with "/", "/" is prepended.
public static final PropertiesLoader.FileLocation ASSETS
"assets" folder.
The file is opened by AssetManager.open(file).
public static final PropertiesLoader.FileLocation RAW
"res/raw" folder.
If this file location type is passed to a load method, the resource
ID of the file (R.raw.file) is looked up by
Resources.getIdentifier(file, "raw", Context.getPackageName()) and then the resource
is opened by Resources.openRawResource(resourceId).
public static PropertiesLoader.FileLocation[] values()
for (PropertiesLoader.FileLocation c : PropertiesLoader.FileLocation.values()) System.out.println(c);
public static PropertiesLoader.FileLocation valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2016. All rights reserved.