Package com.glitchybyte.glib
Class GResources
java.lang.Object
com.glitchybyte.glib.GResources
Java resource handling utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamgetResourceInputStream(Object context, String resourceName) Retrieves anInputStreamfor the given resource name.static StringgetResourceString(Object context, String resourceName) Retrieves a resource as aString.static StringgetVersion(Object context) Retrieves version if built with standard GlitchyByte build scripts.
-
Method Details
-
getResourceInputStream
Retrieves anInputStreamfor the given resource name.- Parameters:
context- Any object within the context of the resource.resourceName- Resource name.- Returns:
- An
InputStreamfor the given resource name.
-
getResourceString
Retrieves a resource as aString.- Parameters:
context- Any object within the context of the resource.resourceName- Resource name.- Returns:
- A resource as a
String. - Throws:
IOException- If an IO error occurs.
-
getVersion
Retrieves version if built with standard GlitchyByte build scripts.- Parameters:
context- Any object within the context of the resource.- Returns:
- Version as reported by build script.
-