Class DataLoader

java.lang.Object
games.stendhal.client.sprite.DataLoader

public class DataLoader extends Object
loads data
Author:
hendrik
  • Constructor Details

    • DataLoader

      public DataLoader()
  • Method Details

    • getResource

      public static URL getResource(String name)
      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

      public static InputStream getResourceAsStream(String name)
      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

      public static void addJarFile(String filename)
      adds a .jar file to the repository
      Parameters:
      filename - name of .jar file