Questions tagged [zipinputstream]

A mechanism for reading zip-compressed data from a stream

A ZipInputStream is a mechanism for reading data from a stream, where the data is in a zip-compressed format. A stream is usually comprised of data being read from a local file, or data being transmitted from a remote server over a network protocol such as HTTP or FTP. As the data is read from the stream, the ZipInputStream decompresses it, and returns the uncompressed data to the application.

164 questions
0
votes
1 answer

Java - Getting an OutOfMemoryError while parsing a ZipInputStream

I have a problem reading the content of a zip file retrieved from a webservice. The zip file is stored in a byte array called bytes as you can see in the code below. ZipInputStream zis = new ZipInputStream(new…
Ema.jar
  • 2,370
  • 1
  • 33
  • 43
0
votes
1 answer

Issue while unzipping file on java upgrade to 1.8

Java version "1.8.0_40" Java(TM) SE Runtime Environment (build 1.8.0_40-b26) I am using core java.util.zip classes. Now while unzipping a client file using this code: public static InputStream unzip(String file,InputStream zip) throws…
0
votes
0 answers

How to unzip bigger zip on Android?

I unzip files in my Android Studio project like this: InputStream is = ... ZipInputStream zis = new ZipInputStream(new BufferedInputStream(is)); try { ZipEntry ze; while ((ze = zis.getNextEntry()) != null) { …
Ralf Wickum
  • 2,850
  • 9
  • 55
  • 103
0
votes
1 answer

How to serve ZipOutputStream to network in JAVA

I am writing a server in JAVA, where client requests to download multiple files and server will create a ZipOutputStream and serve immediately. On the other hand another thread will write to ZipOutputStream. I used piped input/output…
shantanu
  • 2,408
  • 2
  • 26
  • 56
0
votes
1 answer

Unable to unzip a file using java but able to unzip it using 7zip

I am trying to unzip a file using java but the following code doesnt enter the while loop as 'ze' is null. However the same file I am able to unzip using 7zip application. Can someone let me know why is this happpening? try{ //get the zip…
user1496783
  • 29
  • 2
  • 9
0
votes
1 answer

How do I read multiple ZipEntries through a single InputStream

I have to pass an InputStream as a parameter to a 3rd party library, which will read the complete contents from the InputStream and do its job. My problem is, some of my files are Zip files - with more than one ZipEntry. From what I understand, one…
0
votes
1 answer

Zip Exception: Entry is not named while unzipping the zip file

I have downloaded the zip file and when I am unzipping the files I am getting the above exception. Below is my structure after I have unzipped my zip file. zip structure(After unzip): folder1 subfolder1 sub1 …
Ravi Yadav
  • 2,296
  • 3
  • 25
  • 32
0
votes
0 answers

How to use ZipInputStream(JAVA) in IOS/Objective-C?

I need to read the next ZIP file entry and positions the stream at the beginning of the entry data (ZipInputStream getNextEntry). How to do that in Objective-C/IOS because I want to process the files in zip one by one while it is being downloaded. I…
0
votes
0 answers

Download ZipFile from server using zipInputStream

I want to extract and save an incoming ZipFile from the Server. This code works only half of the time. InputStream is = socket.getInputStream(); zipStream = new ZipInputStream(new BufferedInputStream(is); ZipEntry entry; while ((entry =…
Oliver
  • 503
  • 1
  • 3
  • 13
0
votes
1 answer

Read and Modify content of inner zip file using ZipInputStream

I am trying to modify web.xml using ZipInputStream. File to read is web.xml which is inside ear/war file C:/XX.ear/YY.war/WEB-INF/web.xml ZipFile zipFile = new ZipFile("C:/XX.ear"); Enumeration entries = zipFile.entries(); …
Karthigeyan Vellasamy
  • 2,038
  • 6
  • 33
  • 50
0
votes
0 answers

Not able to Iterate over zip file downloaded from private git in JAVA

I have small piece of code which downloads a zip file from github. I have inserted the token in this format https://token:x-oauth-basic@github.xxxx.com/org/repo/archive/branch.zip. The download works but when I do ZipInputStream zis =…
user2124733
  • 51
  • 1
  • 1
  • 4
0
votes
2 answers

ZipInputStream(BufferedInputStream, Charset) is undefined

I did this question and I saw that exist a constructor of ZipInputStream called: ZipInputStream(BufferedInputStream, Charset) but the debugger throws me the error: ZipInputStream(BufferedInputStream, Charset) is undefined and give me the advice:…
ƒernando Valle
  • 3,634
  • 6
  • 36
  • 58
0
votes
1 answer

unzip files are not in exact format

i want to unzip all the folders and different kind of files like .xls,.apk,.png etc.But while extracting all the files are their in newly extracted foder(or folders under that folder). but those .xml,.png ,.apk files are not in proper format. when i…
shaktisinghmoyal
  • 312
  • 1
  • 5
  • 14
0
votes
2 answers

I cannot extract my zip files completely using ZipInputStream

I have several zip files that each contains several files too which I want to extract using the ZipInputStream class. Among them are some images. When I try to extract these images using the BufferedOutputStream they are decompressed partially and…
Ali Allahyar
  • 341
  • 2
  • 11
  • 22
0
votes
0 answers

Sending a Zip file to Rest WebService

I'm trying to implement a method in my java based application that involves uploading a zip file to my server. Client is java, server is java (REST , jboss 7) . In the past I successfully managed to upload image files, but now, with a zip file i am…
NokusFerreira
  • 135
  • 3
  • 12
1 2 3
10
11