"Hi, Amigo!" I came up with an interesting task for you."
"It can only be completed in IntelliJ IDEA. Take a look at these interesting conditions…"
28
Task
Java Collections,
level 1,
lesson 6
Locked
Adding a file to an archive
The main method accepts a list of arguments.
The first argument is the full path to the fileName file.
The second argument is the path to a ZIP file.
Add the fileName file to the archive inside the "new" directory.
Is this part of java course on codegym is very difficult just for me? It seems that in articles you have only the alphabet, and in tasks you have to create your own book.
If you use HashMap<ZipEntry,...> for saving data, when you will put data in new archive it must be:
zipOutputStream.putNextEntry(new ZipEntry(entry.getKey().getName()));
GO TO FULL VERSION