Class GResources

java.lang.Object
com.glitchybyte.glib.GResources

public final class GResources extends Object
Java resource handling utilities.
  • Method Details

    • getResourceInputStream

      public static InputStream getResourceInputStream(Object context, String resourceName)
      Retrieves an InputStream for the given resource name.
      Parameters:
      context - Any object within the context of the resource.
      resourceName - Resource name.
      Returns:
      An InputStream for the given resource name.
    • getResourceString

      public static String getResourceString(Object context, String resourceName) throws IOException
      Retrieves a resource as a String.
      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

      public static String getVersion(Object context)
      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.