|
TrueUpdate Core 0.1.7 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.trueupdate.core.io.Sources
@Immutable public class Sources
Provides functions for Sources.
| Nested Class Summary | |
|---|---|
static interface |
Sources.BindStatement<V,X extends Exception>
|
static interface |
Sources.ExecuteStatement<V,X extends Exception>
|
| Method Summary | ||
|---|---|---|
static
|
bind(InputTask<V,X> task)
|
|
static
|
execute(InputTask<V,X> task)
|
|
static Source |
forResource(String name,
Class<?> clazz)
Returns a source which loads the resource with the given name. |
|
static Source |
forResource(String name,
ClassLoader loader)
Returns a source which loads the resource with the given name. |
|
static Source |
forUrl(URL url)
Returns a source which loads the entity of the given url. |
|
static Source |
input()
Returns a source which reads from standard input without ever closing it. |
|
static Source |
uncloseable(InputStream in)
Returns a source which reads from the given input stream and ignores any call to the InputStream.close() method of the input stream. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <V,X extends Exception> Sources.BindStatement<V,X> bind(InputTask<V,X> task)
public static <V,X extends Exception> Sources.ExecuteStatement<V,X> execute(InputTask<V,X> task)
public static Source forResource(String name,
Class<?> clazz)
name.
This method will use the given class to resolve the resource name and
the class loader as described in
Class.getResourceAsStream(String).
name - the name of the resource to load.clazz - the class to use for loading the resource.
name.
public static Source forResource(String name,
@CheckForNull
ClassLoader loader)
name.
If the given class loader is not null, then the resource will
get loaded as described in
ClassLoader.getResourceAsStream(String).
Otherwise, the resource will get loaded as described in
ClassLoader.getSystemResourceAsStream(String).
name - the name of the resource to load.loader - the nullable class loader to use for loading the resource.
If this is null, then the system class loader will get
used.
name.public static Source forUrl(URL url)
url.
url - the URL.
url.public static Source input()
public static Source uncloseable(InputStream in)
InputStream.close() method of the input stream.
in - the input stream to use.
|
TrueUpdate Core 0.1.7 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||