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.Logger log  
  • Constructor Summary

    Constructors 
    Constructor Description
    ResourceUtils()  
  • Method Summary

    Modifier and Type Method Description
    static java.io.InputStream getResource​(java.lang.String filename)
    Use ClassLoader.getResource to get the named resource
    static java.io.InputStream getResourceViaProperty​(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • log

      protected static org.slf4j.Logger log
  • Constructor Details

  • Method Details

    • getResourceViaProperty

      public static java.io.InputStream getResourceViaProperty​(java.lang.String propName, java.lang.String defaultPath) throws java.io.IOException
      Get 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.IOException
      Use ClassLoader.getResource to get the named resource
      Parameters:
      filename -
      Returns:
      Throws:
      java.io.IOException - if resource not found