Search code examples
javafilezipnative-methods

Managing a ZIP-based compression file in Java


I know that Java natively supports the ability to navigate through and ope files compressed within a ZIP file, as that is what a JAR file is. How can I utilize this to make and manage a ZIP-based file (for saving a program's state)?

Please note that the project I am working on aims to complete its goal WITHOUT ANY EXTERNAL LIBRARIES. All libraries must be already included in Java 1.6 or 1.7.


Solution

  • You can use the java.util.zip package, part of the Java standard library since JDK 1.1.