weka.gui
Class Loader

java.lang.Object
  extended by 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
Loader(String dir)
          initializes the object
 
Method Summary
 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 Detail

Loader

public Loader(String dir)
initializes the object

Method Detail

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



Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.