|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.util.ResourceUtil
public final class ResourceUtil
Loads resources either from the disk or from the jar file.
Copyright Enough Software 2004 - 2011
history
15-Apr-2004 - rob creation
| Constructor Summary | |
|---|---|
ResourceUtil(ClassLoader classLoader)
|
|
| Method Summary | |
|---|---|
InputStream |
open(File baseDir,
String url)
Opens the specified resource. |
InputStream |
open(String baseDir,
String url)
Opens the specified resource. |
String[] |
readTextFile(String baseDir,
String url)
Reads the specified text file and returns its content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceUtil(ClassLoader classLoader)
| Method Detail |
|---|
public InputStream open(String baseDir,
String url)
throws FileNotFoundException
baseDir - the base directoryurl - the url to the resource, a '/'-separated path
FileNotFoundException - when the specified resource could not be found
public InputStream open(File baseDir,
String url)
throws FileNotFoundException
baseDir - the base directoryurl - the url to the resource, a '/'-separated path
FileNotFoundException - when the specified resource could not be found
public String[] readTextFile(String baseDir,
String url)
throws FileNotFoundException,
IOException
baseDir - the base directory containing the resourceurl - the URL to the text file.
FileNotFoundException - when the specified resource could not be found
IOException - when the resource could not be read
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||