net.java.trueupdate.core.io
Class Sources
java.lang.Object
net.java.trueupdate.core.io.Sources
@Immutable
public class Sources
- extends Object
Provides functions for Sources.
- Author:
- Christian Schlichtherle (copied and edited from TrueLicense Core 2.3.1)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
execute
public static <V,X extends Exception> Sources.ExecuteStatement<V,X> execute(InputTask<V,X> task)
forResource
public static Source forResource(String name,
@CheckForNull
ClassLoader loader)
- Returns a source which loads the resource with the given
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).
- Parameters:
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.
- Returns:
- A source which loads the resource with the given
name.
Copyright © 2013 Schlichtherle IT Services. All rights reserved.