Code example for InputStreamReader

0
			String templatePackage = "org/appcelerator/kroll/annotations/generator/";
 
			InputStream v8HeaderStream = loader.getResourceAsStream(templatePackage + "ProxyBindingV8.h.fm");
			InputStream v8SourceStream = loader.getResourceAsStream(templatePackage + "ProxyBindingV8.cpp.fm");
 
			v8HeaderTemplate = new Template("ProxyBindingV8.h.fm", new InputStreamReader(v8HeaderStream), fmConfig);
 
			v8SourceTemplate = new Template("ProxyBindingV8.cpp.fm", new InputStreamReader(v8SourceStream), fmConfig);
 
		} catch (IOException e) {
			e.printStackTrace();
		} 
	} 
 
	protected void saveTypeTemplate(Template template, String outFile, Map<Object, Object> root)
	{ 
		Writer writer = null;
		try { 
			File file = new File(outPath, outFile);
			System.out.println("Generating " + file.getAbsolutePath());