Remove data descriptor entries from zip on write

ZFile does not support writing zip entries with data
descriptor since it is silly in the use cases ZFile is
supposed to be used.

However, when opening an existing zip and changing
entries, such as sorting or aligning entries, it may
happen that some of the sorted entries have a data
descriptor and writing them is unsupported.

This CL fixes this by removing the data descriptor from
all entries when the zip file is open for writing.

Test: JUnit tests included
Change-Id: Ifa4d11218d6c22701b784c879367da454d6322fc
3 files changed
tree: c6d72d8d6bb697111e987899bf5dced50c653976
  1. src/
  2. apkzlib.iml
  3. BUILD
  4. build.gradle