Questions tagged [zipoutputstream]

ZipOutputStream is used to write ZipEntrys to the underlying stream. Output from ZipOutputStream can be read using ZipFile or ZipInputStream.

A ZipOutputStream is a mechanism for writing data to a stream in a zip-compressed format. A stream is usually comprised of data to write to a local file, or data being transmitted to a remote server over a network protocol such as HTTP or FTP. As the data is given to the ZipOutputStream, it is compressed, and then transmitted to the stream.

170 questions
-1
votes
1 answer

Why can't I flush ZipOutputStream?

I am trying to create a zip archive in java. Every iteration adds some data to a ZipEntry and I wanted to flush the contents after every iteration ( due to server restart handling ). But ZipOutputStream flush() does not work. i.e. contents are not…
-1
votes
1 answer

Trouble generating over 200MB file into ZIP using ByteArrayOutputStream and ZipOutputStream

I need your help again. My application trying to export user's files (settings, processes, standard files, etc.) as ZIP. This exported ZIP will be used later to import user's files in other system. So far I have done following code: def files =…
-2
votes
1 answer

writing into file in a client and NegativeArraySizeException

i have a server which sending thousands of tiny files like below: static File file = null; static File temp = null; private static ServerSocket serverSocket; private static Socket socket; public static void main(String[] args) throws…
lonesome
  • 2,503
  • 6
  • 35
  • 61
-3
votes
2 answers

How to fix the problem that putNextEntry(ZipEntry) does not accept ZipParameters?

When I include fileName and zipParameter in putNextEntry(): ZipOutputStream.putNextEntry(fileName, zipParameter); It shows an error: The method putNextEntry(ZipEntry) in the type ZipOutputStream is not applicable for the arguments (String,…
-3
votes
2 answers

Converting binary value to downloadable zipfile

I have a scenario where I have to convert binary data to zipfile and I have to download it in java. I am struck with a part how to convert binary to zipformate. Any help will be appreciated.
1 2 3
11
12