A utility class containing methods for retrieving application resources;
these resources typically reside within a JAR file among the classes that
make up an application. The location of a resource is specified as a path
relative to the location of a class within the application's class
hierarchy. This "anchor class" is specified in the constructor.
Resources may be retrieved as byte arrays, as Strings, as
InputStreams, as AudioClips, as
Images, or as Properties objects.
Retrieve a resource as a String. Retrieves the specified
resource, returning its data as a String. It is assumed that
the resource contains printable text.
Parameters:
path - The location of the resource.
Throws:
IOException - If an error occurred while reading the
resource's data.
Retrieve a resource as an AudioClip. Retrieves the specified
resource, returning its data as an AudioClip. It is assumed
that the resource contains valid audio data.
Retrieve a resource as an Image. Retrieves the specified
resource, returning its data as an Image. It is assumed that
the resource contains valid image data.
Retrieve a resource as a Properties object. Retrieves the
specified resource, returning its data as a Properties
object. It is assumed that the resource is a properly-formatted property
list.
Parameters:
path - The location of the resource.
Throws:
IOException - If an error occurred while reading the
resource's data.
imageUpdate
public boolean imageUpdate(Image img,
int infoflags,
int x,
int y,
int w,
int h)
Image tracker method. This is an internal method and should not be called
directly.