Announcement Announcement Module
Collapse
No announcement yet.
Is there any api for zipping and unzipping in spring or Spring integration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there any api for zipping and unzipping in spring or Spring integration

    hi everyone,

    I had a requirement in which i will be zipping and unzipping files ,is there any support for it in spring and spring integration . I know there is an api available in java to do this but wanted to know does spring has any api for this

  • #2
    Its pretty straight forward using the Zip(GZip)OutputStream and Zip(GZip)InputStream from java.util.zip package. What is it that you are looking for that you aren't able to achieve using this?

    Comment


    • #3
      I can definitely achieve using java.util.zip package just wanted to know any transformers available in spring . And i have one issue in that amol.If the zip file contains a folder inside it then it throws an exception java.io.IOException: Write error .So i have to manually create those folder where i want to zip then it works .Any solution for this so that when unzipping if there is a folder it creates the folder automatically and unzippes it

      Comment


      • #4
        It should work if you use the ZipFile and then iterate over the entries in the file, instead of using the Zip based streams directly. We had some issues with using those directly, using ZipFile saved the day for us.

        Comment

        Working...
        X