Gets the document attribute of the
FileExtensionDocumentHandler object
Document doc = null;
String name = file.getName();
try {
if (name.endsWith(".txt")) {
doc = TextDocument.Document(file);
}
if (name.endsWith(".html")) {
doc = HtmlDocument.Document(file);
}
} catch (java.io.IOException e) {
throw new DocumentHandlerException(e);
}
return doc;