Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

FileOutputSteam write - remove the NUL bytes at the start of the zip file

6859ebfb-edb6-478f-8822-b67e134dc40dMar 3 2020 — edited Mar 4 2020

Hi,

We have a requirement to create a zip file, the zip file has 3 or 4 files inside it, while these files are getting generated in the back ground NUL bytes are getting added to the zip file, so the file is corrupt or it is not possible to process the zip in the application. Could you please suggest how we can remove these NUL bytes in the zip and the zip should start with PK when it is opened in notepad.

Thanks.

Comments

morgalr

Remove the NULLs from the source before it gets into the ZIPs

1 - 1

Post Details

Added on Mar 3 2020
1 comment
538 views