public class ZipArchives
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
static void |
createArchive(java.nio.file.Path archive,
java.nio.file.Path sourceDirectory) |
Creates a ZIP archive from the contents of the given directory.
|
static void |
createArchive(java.nio.file.Path archive,
java.nio.file.Path sourceDirectory,
java.nio.charset.Charset charset) |
Creates a ZIP archive from the contents of the given directory.
|
static void |
extractArchive(java.nio.file.Path archive,
java.nio.file.Path destinationDirectory) |
Extracts the contents of the given ZIP archive into the given directory.
|
static void |
extractArchive(java.nio.file.Path archive,
java.nio.file.Path destinationDirectory,
java.nio.charset.Charset charset) |
Extracts the contents of the given ZIP archive into the given directory.
|
static void |
walkArchiveTree(java.nio.file.Path archive,
int maxDepth,
java.nio.file.FileVisitor<? super java.nio.file.Path> visitor) |
Walks the file tree of the given ZIP archive up to the given maximum depth.
|
static void |
walkArchiveTree(java.nio.file.Path archive,
int maxDepth,
java.nio.file.FileVisitor<? super java.nio.file.Path> visitor,
java.nio.charset.Charset charset) |
Walks the file tree of the given ZIP archive up to the given maximum depth.
|
static void |
walkArchiveTree(java.nio.file.Path archive,
java.nio.file.FileVisitor<? super java.nio.file.Path> visitor) |
Walks the file tree of the given ZIP archive.
|
static void |
walkArchiveTree(java.nio.file.Path archive,
java.nio.file.FileVisitor<? super java.nio.file.Path> visitor,
java.nio.charset.Charset charset) |
Walks the file tree of the given ZIP archive.
|
public static void createArchive(java.nio.file.Path archive,
java.nio.file.Path sourceDirectory)
throws java.io.IOException
java.lang.IllegalArgumentException - if archive is nulljava.lang.IllegalArgumentException - if sourceDirectory is nulljava.io.IOException - if an I/O occurspublic static void createArchive(java.nio.file.Path archive,
java.nio.file.Path sourceDirectory,
java.nio.charset.Charset charset)
throws java.io.IOException
java.lang.IllegalArgumentException - if archive is nulljava.lang.IllegalArgumentException - if sourceDirectory is nulljava.lang.IllegalArgumentException - if charset is nulljava.io.IOException - if an I/O occurspublic static void extractArchive(java.nio.file.Path archive,
java.nio.file.Path destinationDirectory)
throws java.io.IOException
java.lang.IllegalArgumentException - if archive is nulljava.lang.IllegalArgumentException - if destinationDirectory is nulljava.io.IOException - if an I/O occurspublic static void extractArchive(java.nio.file.Path archive,
java.nio.file.Path destinationDirectory,
java.nio.charset.Charset charset)
throws java.io.IOException
java.lang.IllegalArgumentException - if archive is nulljava.lang.IllegalArgumentException - if destinationDirectory is nulljava.lang.IllegalArgumentException - if charset is nulljava.io.IOException - if an I/O occurspublic static void walkArchiveTree(java.nio.file.Path archive,
java.nio.file.FileVisitor<? super java.nio.file.Path> visitor)
throws java.io.IOException
java.lang.IllegalArgumentException - if archive is nulljava.lang.IllegalArgumentException - if visitor is nulljava.io.IOException - if an I/O occurspublic static void walkArchiveTree(java.nio.file.Path archive,
java.nio.file.FileVisitor<? super java.nio.file.Path> visitor,
java.nio.charset.Charset charset)
throws java.io.IOException
java.lang.IllegalArgumentException - if archive is nulljava.lang.IllegalArgumentException - if visitor is nulljava.lang.IllegalArgumentException - if charset is nulljava.io.IOException - if an I/O occurspublic static void walkArchiveTree(java.nio.file.Path archive,
int maxDepth,
java.nio.file.FileVisitor<? super java.nio.file.Path> visitor)
throws java.io.IOException
java.lang.IllegalArgumentException - if archive is nulljava.lang.IllegalArgumentException - if visitor is nulljava.io.IOException - if an I/O occurspublic static void walkArchiveTree(java.nio.file.Path archive,
int maxDepth,
java.nio.file.FileVisitor<? super java.nio.file.Path> visitor,
java.nio.charset.Charset charset)
throws java.io.IOException
java.lang.IllegalArgumentException - if archive is nulljava.lang.IllegalArgumentException - if maxDepth is negativejava.lang.IllegalArgumentException - if visitor is nulljava.lang.IllegalArgumentException - if charset is nulljava.io.IOException - if an I/O occurs