Package com.aquima.web.util
Class TemplateUtil
java.lang.Object
com.aquima.web.util.TemplateUtil
Util class for easy text template usage.
- Since:
- 8.1
- Author:
- Jon van Leuven
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
readAndCloseTemplate
(InputStream stream, Map<String, String> values) This method reads the stream and substitutes all values.
-
Method Details
-
readAndCloseTemplate
public static String readAndCloseTemplate(InputStream stream, Map<String, String> values) throws IOExceptionThis method reads the stream and substitutes all values. After reading the stream will be closed.- Parameters:
stream
- The stream, may not be nul.values
- The values, may be null- Returns:
- The read template content with substituted variables
- Throws:
IOException
- When reading of the passed stream failed.
-