last day (18 days later) » 

2:57 PM
2
A: Extract zip and re-zip with password in java

ThomasRefactoring Refactoring your code will help you understand what it does. It will reveal the problem and immediately identify a fix. Here's how it goes. Note that this is not a complete tutorial, but I hope you get the point. First, extract a nice method that does the unzipping. Mark everything ...

 
I can see in the program its adding only one file as you said, but String FileNames = file.getName(); is in a for loop and suppose to get all file names right?
Wow, super! Thanks so much Thomas. That's a lot of effort. No one has given a description like this till now. I can analyse the code now and I will in mind about readability next time ;)
Move the lineFile folder3 = new File(ListOfDirectories);into the method What should I name the method here?
 
Do not extract a method. Just cut/paste it into rezip
 
Like this rezip(listOfFiles2, i, ListOfDirectories,new File(ListOfDirectories)); ?
 
Sorry if that's not thoroughly described. Don't move it into the method call but inside the method declaration, the first line below private void rezip(...){
Unfortunately I didn't keep the code... I hope I can still follow
 
May the code is still in sitting in recycle bin
 
3:00 PM
No. It was a temporary change in one of my Unit tests and I reverted it in SVN...
FYI: I'll have to leave office in 30 minutes.
Move ZipFile zipFile = new ZipFile(...) out of the loop
 
Ok I am working on it. Won't be long
Throws error at this line rezip(listOfFiles2, i, ListOfDirectories); after removing folder3 parameter
 
Have you also removed it at the method declaration?
 
3:17 PM
let me check
I removed it now. error is gone
 
3:32 PM
Ok, I have to leave. I'm not sure if the chat still exists tomorrow. Leave a comment on the answer if you need me again.
 
Ok Thank you
 

  last day (18 days later) »