Package weka.gui

# Class Loader

java.lang.Object
weka.gui.Loader

public class Loader extends Object
This class is for loading resources from a JAR archive.

Version:
  $Revision: 8034 $
Author:
  FracPete (fracpete at waikato dot ac dot nz)

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Loader(String dir)`
  initializes the object

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDir()`
  returns the dir prefix
  `InputStream`
  `getInputStream(String filename)`
  returns an InputStream for the given filename, can be NULL if it fails
  `static InputStream`
  `getInputStream(String dir, String filename)`
  returns an InputStream for the given dir and filename, can be NULL if it fails
  `Reader`
  `getReader(String filename)`
  returns a Reader for the given filename, can be NULL if it fails
  `static Reader`
  `getReader(String dir, String filename)`
  returns a Reader for the given filename and dir, can be NULL if it fails
  `URL`
  `getURL(String filename)`
  returns a URL for the given filename, can be NULL if it fails
  `static URL`
  `getURL(String dir, String filename)`
  returns a URL for the given filename, can be NULL if it fails
  `String`
  `processFilename(String filename)`
  returns the processed filename, i.e.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Loader

    public Loader(String dir)
    initializes the object

- ## Method Details

  - ### getDir

    public String getDir()
    returns the dir prefix

  - ### processFilename

    public String processFilename(String filename)
    returns the processed filename, i.e. with the dir-prefix if it's missing

  - ### getURL

    public static URL getURL(String dir, String filename)
    returns a URL for the given filename, can be NULL if it fails

  - ### getURL

    public URL getURL(String filename)
    returns a URL for the given filename, can be NULL if it fails

  - ### getInputStream

    public static InputStream getInputStream(String dir, String filename)
    returns an InputStream for the given dir and filename, can be NULL if it fails

  - ### getInputStream

    public InputStream getInputStream(String filename)
    returns an InputStream for the given filename, can be NULL if it fails

  - ### getReader

    public static Reader getReader(String dir, String filename)
    returns a Reader for the given filename and dir, can be NULL if it fails

  - ### getReader

    public Reader getReader(String filename)
    returns a Reader for the given filename, can be NULL if it fails