Class ResourceUtils
java.lang.Object
pro.verron.officestamper.test.utils.ResourceUtils
A utility class for testing. Provides methods for retrieving InputStreams from specified resource paths. Typically
used for accessing test resources.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ImageRetrieves an image from the specified resource path.static ImageRetrieves an image from the specified resource path.static org.docx4j.openpackaging.packages.PresentationMLPackagegetPowerPointResource(Path path) Retrieves a PresentationMLPackage from the specified resource path.static InputStreamgetResource(Path path) Retrieves an InputStream for the specified resource path.static org.docx4j.openpackaging.packages.WordprocessingMLPackagegetWordResource(String path) Retrieves a WordprocessingMLPackage from the specified resource path.static org.docx4j.openpackaging.packages.WordprocessingMLPackagegetWordResource(Path path) Retrieves a WordprocessingMLPackage from the specified resource path.
-
Constructor Details
-
ResourceUtils
public ResourceUtils()Default constructor.
-
-
Method Details
-
getImage
-
getImage
-
getResource
Retrieves an InputStream for the specified resource path.- Parameters:
path- the path of the resource- Returns:
- an InputStream for the specified resource
-
getWordResource
public static org.docx4j.openpackaging.packages.WordprocessingMLPackage getWordResource(String path) Retrieves a WordprocessingMLPackage from the specified resource path.- Parameters:
path- the path of the resource- Returns:
- a WordprocessingMLPackage for the specified resource
-
getWordResource
Retrieves a WordprocessingMLPackage from the specified resource path.- Parameters:
path- the path of the resource- Returns:
- a WordprocessingMLPackage for the specified resource
-
getPowerPointResource
public static org.docx4j.openpackaging.packages.PresentationMLPackage getPowerPointResource(Path path) Retrieves a PresentationMLPackage from the specified resource path.- Parameters:
path- the path of the resource- Returns:
- a PresentationMLPackage for the specified resource
-