Uploaded image for project: 'ODF Toolkit'
  1. ODF Toolkit
  2. ODFTOOLKIT-194

Using ZipFile load ODF Package

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • odfdom-0.8.7
    • None
    • java
    • None
    • Operating System: Windows
      Platform: PC
    • 335

    Description

      ZipInputStream and ZipFile process ZIP differently. ZipInputStream reads the entries from the start of the file, one by one. This is what is wanted for streaming. ZipFile uses random access to get the ZIP table of contents at the end of the document, and then returns zip entries.

      It looks like the problem with Symphony 1.3 files occurs only with ZipInputStream. If I use ZipFile, it works correctly.

      Using a ZipFile is more efficient for getting to a specific entry. For example, if you want to get content.xml, a ZipInputStream will require that you process the ZIP file from the start and read each entry until you come to content.xml. With a ZipFile you can call geEntry("content.xml") and it will go directly to that entry, using random access.

      I will add a new method OdfPackage.loadPackage(ZipFile pkgFile, String pkgFilePath) in the following patch to realize ZipFile loading.

      Devin

      Attachments

        Activity

          People

            devin@odftoolkit.org devin
            devin@odftoolkit.org devin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: