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 there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Zip HTML Files in Java

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


    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, Registered Users 2 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, Registered Users 2 Posts: 2,751 ✭✭✭ec18


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


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




  • Registered Users, Registered Users 2 Posts: 2,751 ✭✭✭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