writer = new FileWriter(file);
DefaultStyledDocument doc = new DefaultStyledDocument();
new RTFEditorKit().read(reader, doc, 0);
writer.write(doc.getText(0, doc.getLength()));
} catch (Exception ioe) {
throw new ExtractionException("failed to parse rtf document", ioe,logger);
}
finally {
if (reader != null) {
try {
reader.close();
} catch (IOException ioe) {}
}
if (writer != null) {
try {
writer.close();
} catch (IOException ioe) {}
}
}
try {
return new FileReader(file);
} catch(Exception ex) {
throw new ExtractionException("failed to extract text from powerpoint document",ex,logger,Level.DEBUG);
}
}