|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.util.ResourceUtil
public class ResourceUtil
Utility methods relating to resources.
| Constructor Summary | |
|---|---|
ResourceUtil()
|
|
| Method Summary | |
|---|---|
static String |
getPreferredResourceDir()
Returns the resource directory stored in the preferences, which (if present) overrides the default resource directory. |
static InputStream |
getResourceAsStream(String path)
Gets the identified resource as a stream, logging an error and returning an empty stream if it doesn't exist. |
static Properties |
loadProperties(String path)
Reads a set of properties from a resource. |
static String[] |
loadStrings(String path)
Reads a list of newline-delimited strings from a resource. |
static void |
setPreferredResourceDir(String dir)
Sets the preferred resource directory. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceUtil()
| Method Detail |
|---|
public static String getPreferredResourceDir()
null to use the default.public static void setPreferredResourceDir(String dir)
dir - the resource directory to store, or null to use to the default.public static String[] loadStrings(String path)
public static Properties loadProperties(String path)
public static InputStream getResourceAsStream(String path)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||