Package org.docx4j.utils
Class ResourceUtils
java.lang.Object
org.docx4j.utils.ResourceUtils
public class ResourceUtils
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Loggerlog -
Constructor Summary
Constructors Constructor Description ResourceUtils() -
Method Summary
Modifier and Type Method Description static java.io.InputStreamgetResource(java.lang.String filename)Use ClassLoader.getResource to get the named resourcestatic java.io.InputStreamgetResourceViaProperty(java.lang.String propName, java.lang.String defaultPath)Get this resource from the location specified in docx4j.properties; if none is specified, fallback to the default specified
-
Field Details
-
log
protected static org.slf4j.Logger log
-
-
Constructor Details
-
ResourceUtils
public ResourceUtils()
-
-
Method Details
-
getResourceViaProperty
public static java.io.InputStream getResourceViaProperty(java.lang.String propName, java.lang.String defaultPath) throws java.io.IOExceptionGet this resource from the location specified in docx4j.properties; if none is specified, fallback to the default specified- Parameters:
propName-defaultPath-- Returns:
- Throws:
java.io.IOException- Since:
- 3.2.0
-
getResource
public static java.io.InputStream getResource(java.lang.String filename) throws java.io.IOExceptionUse ClassLoader.getResource to get the named resource- Parameters:
filename-- Returns:
- Throws:
java.io.IOException- if resource not found
-