clojure-india

IN/Clojure 2020 | https://inclojure.org | https://twitter.com/in_clojure
2017-04-13T09:31:52.367044Z

Does anyone know how to open compressed zip file in clojure?

Shantanu Kumar 2017-04-13T09:47:20.594351Z

@niten.sagar How about the command jar xvf the-zip-file.zip? 😛

Shantanu Kumar 2017-04-13T09:47:46.600868Z

On a serious note, you can use the ZipInputStream via Java interop - http://stackoverflow.com/a/10188601/188505

2017-04-13T09:56:54.735274Z

thanks @kumarshantanu

2017-04-13T10:53:07.462050Z

@kumarshantanu i have try using ZipInputStream as explained in stackoverflow article but its giving NullPointerException i know there is a multiple csv files compress in a zip folder my zip folder looks something like this 2017-04-09-11-00-events.csv.zip

Shantanu Kumar 2017-04-13T11:06:07.620637Z

@niten.sagar You should probably print out the ZIP entry filenames to ascertain that your program is encountering the filenames you know exist in the ZIP file

Shantanu Kumar 2017-04-13T11:06:38.626973Z

the stack trace in NullPointerException will tell you the exact point where it encountered an unexpected nil