* FIXME This is a very simple implementation of some text-based attachment, mainly used for testing.
* This should be replaced /moved to Attachment search providers or some other 'plugable' wat to search attachments
*/
protected String getAttachmentContent( Attachment att )
{
AttachmentManager mgr = m_engine.getAttachmentManager();
//FIXME: Add attachment plugin structure
String filename = att.getFileName();
if(filename.endsWith(".txt") ||
filename.endsWith(".xml") ||
filename.endsWith(".ini") ||
filename.endsWith(".html"))
{
InputStream attStream;
try
{
attStream = mgr.getAttachmentStream( att );
StringWriter sout = new StringWriter();
FileUtil.copyContents( new InputStreamReader(attStream), sout );
attStream.close();