I have an encrypted ODT (Open Document Text) file and I need to unzip it. ODT is a ZIP file. An encrypted ODT is a normal ZIP file, just some files inside the ZIP are encrypted.
Using ZipFile works okay in a test, but I cannot use ZipFile really because I have a stream in memory, I don't want to work with a file.
Therefore I use ZipInputStream. But using ZipInputStream.getNextEntry() throws the dreadful only DEFLATED entries can have EXT descriptor exception.
From what I can understand, it throws on the first encrypted file inside the ZIP package, for example on content.xml. Because OpenOffice has encrypted the xml file, it was probably no point compressing it and it was stored inside the ZIP package uncompressed.
But ZipInputStream seems to have a problem with it and I don't see a way around.
And yes, the encrypted ODT file was created by OpenOffice Writer 3.2.1. And yes, the stock ZipInputStream cannot even enumerate through entries in it.
Anything you can suggest?