Class ResourceUtils

java.lang.Object
org.docx4j.utils.ResourceUtils

public class ResourceUtils extends Object
  • Field Details

    • log

      protected static org.slf4j.Logger log
  • Constructor Details

    • ResourceUtils

      public ResourceUtils()
  • Method Details

    • getResourceViaProperty

      public static InputStream getResourceViaProperty(String propName, String defaultPath) throws 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:
      IOException
      Since:
      3.2.0
    • getResource

      public static InputStream getResource(String filename) throws IOException
      Use ClassLoader.getResource to get the named resource
      Parameters:
      filename -
      Returns:
      Throws:
      IOException - if resource not found