Create empty zip files using ZipOutputStream

There was an Android patch on ZipOutputStream that prevented it from
being used to create an empty zip. The behavior has been in Android
since version 1. It looks as though that was because the RI did not
allow that (or allow reading an empty zip). Since then upstream has
changed behavior to allow both creation and reading of empty zip.
Android already supports reading an empty zip (there is a test for
that) and this adds support for creating an empty zip.

Extended the existing test to verify that the empty zip file can be
read by the ZipInputStream and ZipFile.

The upstream bugs relating to this are:
* JDK-6440786 - Cannot create a ZIP file containing zero entries
* JDK-6334003 - ZipFile throws ZipException on open a empty zipfile
                from winzip

Bug: 110251104
Test: ran CtsLibcoreTestCases
Change-Id: Ib9ae603b44b4b25c0cb23a1c96547397089eca55
2 files changed