@Throws(IOException::class) fun write(writer: Writer) { val map: MutableMap<String, Any> = HashMap() map["vcards"] = vcards map["utils"] = TemplateUtils() map["translucentBg"] = readImage("translucent-bg.png", ImageType.PNG) map["noProfile"] = readImage("no-profile.png", ImageType.PNG) map["ezVCardVersion"] = Ezvcard.VERSION map["ezVCardUrl"] = Ezvcard.URL map["scribeIndex"] = ScribeIndex() try { template.process(map, writer) } catch (e: TemplateException) { throw RuntimeException(e) } writer.flush() }
Writes the HTML document to a writer .