zipEntry = zipStream.getNextEntry();
} // end while
This worked like a charm on windows but on linux the vm left the while loop, although, proveable, zipEntry was not null.
I changed the loop to
while ( (zipEntry=zipStream.getNextEntry()) != null)
and now it works on linux too. I feel completely confused about this behaviour. Maybe I should open a bug, as I can reproduce it with a large zip stream. In the meantime I learned a lot about encoding troubles with zip archives, and that the ant zip task doesn't use util.zip but it's own implementation that doesnt encode filenames with UTF-8 on windows like util.zip does.