| java.lang.Object com.anthonyeden.lib.util.VelocityTool
VelocityTool | public class VelocityTool (Code) | | A simple tool for parsing files which use the Velocity templating
language.
author: Anthony Eden |
parse | public static void parse(Reader reader, Writer writer, Map contextMap) throws Exception(Code) | | Pass all data from the given Reader through Velocity and write the
resulting data to the given Writer.
Parameters: reader - The reader Parameters: writer - The writer Parameters: contextMap - The context map throws: Exception - |
parseInputStream | public static String parseInputStream(InputStream in, Map contextMap) throws Exception(Code) | | Parse the text file at the given path. Variables are specified as
name/value pairs in the contextMap.
Parameters: in - The input stream Parameters: contextMap - The name/value variable pairs The resulting String throws: Exception - |
parseTextFile | public static String parseTextFile(String path) throws Exception(Code) | | Parse the text file at the given path.
Parameters: path - The path The resulting String throws: Exception - |
parseTextFile | public static String parseTextFile(String path, Map contextMap) throws Exception(Code) | | Parse the text file at the given path. Variables are specified as
name/value pairs in the contextMap.
Parameters: path - The path Parameters: contextMap - The name/value variable pairs The resulting String throws: Exception - |
parseTextFile | public static String parseTextFile(File file) throws Exception(Code) | | Parse the text file at the given path.
Parameters: file - The File The resulting String throws: Exception - |
parseTextFile | public static String parseTextFile(File file, Map contextMap) throws Exception(Code) | | Parse the text file. Variables are specified as name/value pairs in
the contextMap.
Parameters: file - The File Parameters: contextMap - The name/value variable pairs The resulting String throws: Exception - |
|
|