public class ResourceLoader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
TIMEOUT |
Constructor and Description |
---|
ResourceLoader()
Constructor for ResourceLoader.
|
ResourceLoader(java.lang.ClassLoader cl)
Constructor for ResourceLoader.
|
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
loadClassPathResourceAsStream(java.lang.String name) |
java.io.InputStream |
loadClassPathResourceAsStreamOrThrow(java.lang.String name) |
java.io.InputStream |
loadResourceAsStream(java.lang.String name)
Attempts to load the resource from file, a URL or the claspath
|
public ResourceLoader()
public ResourceLoader(java.lang.ClassLoader cl)
public java.io.InputStream loadResourceAsStream(java.lang.String name) throws RuleSetNotFoundException
Caller is responsible for closing the InputStream
.
name
- The resource to attempt and loadRuleSetNotFoundException
public java.io.InputStream loadClassPathResourceAsStream(java.lang.String name) throws java.io.IOException
java.io.IOException
public java.io.InputStream loadClassPathResourceAsStreamOrThrow(java.lang.String name) throws RuleSetNotFoundException
RuleSetNotFoundException
Copyright © 2002–2018 PMD. All rights reserved.