public final class ResourceLoader extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
TIMEOUT |
| Modifier and Type | Method and Description |
|---|---|
static InputStream |
loadResourceAsStream(String name)
Method to find a file, first by finding it as a file (either by the
absolute or relative path), then as a URL, and then finally seeing if it
is on the classpath.
|
static InputStream |
loadResourceAsStream(String name,
ClassLoader loader)
Uses the ClassLoader passed in to attempt to load the resource if it's
not a File or a URL
|
public static InputStream loadResourceAsStream(String name) throws RuleSetNotFoundException
Caller is responsible for closing the InputStream.
name - StringRuleSetNotFoundExceptionpublic static InputStream loadResourceAsStream(String name, ClassLoader loader) throws RuleSetNotFoundException
Caller is responsible for closing the InputStream.
name - Stringloader - ClassLoaderRuleSetNotFoundExceptionCopyright © 2002–2017 PMD. All rights reserved.