Obtain information about the document format before opening it To avoid an exception if you are not sure what the actual content of the file is using Java....File (HTML).html HTML document. Test File (MHTML).mhtml MHTML...FileFormatType (e.g., DOCX, RTF, HTML), whether the file is encrypted...