Package games.stendhal.client.sprite
Class DataLoader
java.lang.Object
games.stendhal.client.sprite.DataLoader
loads data
- Author:
- hendrik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addJarFile(String filename)
adds a .jar file to the repositorystatic URL
getResource(String name)
Finds the resource with the given name.static InputStream
getResourceAsStream(String name)
Returns an input stream for reading the specified resource.
-
Constructor Details
-
DataLoader
public DataLoader()
-
-
Method Details
-
getResource
Finds the resource with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code.The name of a resource is a '/'-separated path name that identifies the resource.
- Parameters:
name
- The resource name- Returns:
- A URL object for reading the resource, or null if the resource could not be found or the invoker doesn't have adequate privileges to get the resource.
-
getResourceAsStream
Returns an input stream for reading the specified resource.The search order is described in the documentation for
getResource(String)
.- Parameters:
name
- The resource name- Returns:
- An input stream for reading the resource, or null if the resource could not be found
- Since:
- 1.1
-
addJarFile
adds a .jar file to the repository- Parameters:
filename
- name of .jar file
-