|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.anadix.factories.SourceFactory
public final class SourceFactory
Creates instances of Source for different types of sources
| Method Summary | |
|---|---|
static Source |
newClassPathSource(String resource)
Creates a new Source from a classpath resource. |
static Source |
newClassPathSource(String resource,
boolean cache)
Creates a new Source from a classpath resource. |
static Source |
newFileSource(File file)
Creates a new source pointing at a file |
static Source |
newFileSource(File file,
boolean cache)
Creates a new source pointing at a file |
static Source |
newFileSource(String filename)
Creates a new source pointing at a file |
static Source |
newFileSource(String filename,
boolean cache)
Creates a new source pointing at a file |
static Source |
newStringSource(String source)
Creates a new source from a String |
static Source |
newStringSource(String source,
String description)
Creates a new source from a String |
static Source |
newURLSource(URL url)
Creates a new Source from an URL resource. |
static Source |
newURLSource(URL url,
boolean cache)
Creates a new Source from an URL resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Source newFileSource(File file)
throws SourceException
file - - file to read a source from
SourceException - - if any error occurs during creation of new Source
public static Source newFileSource(File file,
boolean cache)
throws SourceException
file - - file to read a source fromcache - - whether to cache the result in memory
SourceException - - if any error occurs during creation of new Source
public static Source newFileSource(String filename)
throws SourceException
filename - - path to file to read a source from
SourceException - - if any error occurs during creation of new Source
public static Source newFileSource(String filename,
boolean cache)
throws SourceException
filename - - path to file to read a source fromcache - - whether to cache the result in memory
SourceException - - if any error occurs during creation of new Sourcepublic static Source newStringSource(String source)
source - - String containing the actual source
public static Source newStringSource(String source,
String description)
source - - String containing the actual sourcedescription - - descripton of the Source
public static Source newClassPathSource(String resource)
throws SourceException
resource - - path to the resource
SourceException - - if any error occurs during creation of new Source
public static Source newClassPathSource(String resource,
boolean cache)
throws SourceException
resource - - path to the resourcecache - - whether to cache the result in memory
SourceException - - if any error occurs during creation of new Source
public static Source newURLSource(URL url)
throws SourceException
url - - URL to get resource from
SourceException - - if any error occurs during creation of new Source
public static Source newURLSource(URL url,
boolean cache)
throws SourceException
url - - URL to get resource fromcache - - whether to cache the result in memory
SourceException - - if any error occurs during creation of new Source
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||