public class ClasspathResourceFinderRecursive extends ClasspathResourceFinderBasic
ClasspathResourceFinderBasic but searches for resources up the parent class hierarchy chain.ClasspathResourceFinder.Null| Modifier and Type | Field and Description |
|---|---|
static ClasspathResourceFinderRecursive |
INSTANCE
Reusable instance.
|
| Constructor and Description |
|---|
ClasspathResourceFinderRecursive() |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
findResource(Class<?> baseClass,
String name,
Locale locale)
Returns the contents of the resource with the specified name.
|
findFileSystemResourcefindClasspathResource, getCandidateFileNamespublic static final ClasspathResourceFinderRecursive INSTANCE
public ClasspathResourceFinderRecursive()
public InputStream findResource(Class<?> baseClass, String name, Locale locale) throws IOException
ClasspathResourceFinderfindResource in interface ClasspathResourceFinderfindResource in class ClasspathResourceFinderBasicbaseClass - The class to use to retrieve the resource.name - The resource name.
See Class.getResource(String) for format.locale - The locale of the resource to retrieve.
IOException - Thrown by underlying stream.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.