Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all,
Vanilla are planning an update to the site on April 24th (next Wednesday). It is a major PHP8 update which is expected to boost performance across the site. The site will be down from 7pm and it is expected to take about an hour to complete. We appreciate your patience during the update.
Thanks all.

Zip HTML Files in Java

  • 26-08-2014 3:20pm
    #1
    Registered Users Posts: 2,700 ✭✭✭


    Hi,

    I have a folder of html files and their associated folders. eg index.html and index. I'm trying to write some java code to create a zip containing the .html and the folder. The current code I have zips the files but places all the files in the index folder in the top level of the . Is there a way to code that allows java to create a xip file preserving the html with folder structure?
    Tagged:


Comments

  • Registered Users Posts: 7,157 ✭✭✭srsly78


    Yes it should be just an extra parameter passed to whatever compression library you use. If your compression library doesn't offer this feature then use a better one. Refer to the documentation.


  • Registered Users Posts: 2,700 ✭✭✭ec18


    Thanks I'm using the zip output stream and zipoutputstream.putnextentry() ........ any recommendation on a compression library?


  • Registered Users Posts: 7,157 ✭✭✭srsly78




  • Registered Users Posts: 2,700 ✭✭✭ec18


    What I wanted to do was actually easier.....All I needed to do as add the folder structure that I wanted to the file Input stream and it recreated the structure I needed.


Advertisement