protected void exportPage(WikiEngine engine, Attachment att) throws IOException, ProviderException { exportPageHeader(att.getName(), att.getWiki(), att.getAuthor(), att.getLastModified(), true); m_out.println(" <sv:property sv:name='" + att.getFileName() + "' sv:type='" + BINARY + "'>"); m_out.print("<sv:value>"); InputStream binary = engine.getAttachmentManager().getAttachmentStream(att); Base64.InputStream base64 = new Base64.InputStream(binary, Base64.ENCODE); FileUtil.copyContents(new InputStreamReader(base64), m_out); binary.close(); m_out.println("</sv:value>"); m_out.println("</sv:property>"); exportPageFooter(); }