// password (such a document appears to not be encrypted by
// someone viewing the document, thus the confusion). We will
// attempt to decrypt with the empty password to handle this case.
//
log.debug("Document is encrypted, decrypting with empty password");
DecryptDocument decryptor = new DecryptDocument( document );
try
{
decryptor.decryptDocument("");
}
catch (CryptographyException e)
{
throw new IOException("Error decrypting document, details: " + e.getMessage());
}