public class Extractor
extends java.lang.Object
| Constructor and Description |
|---|
Extractor() |
| Modifier and Type | Method and Description |
|---|---|
static void |
extractMissingResources(java.nio.file.Path assetPath)
Extracts any missing files from assetPath in the JAR to the same path relative to the JAR file.
|
static boolean |
extractResource(java.nio.file.Path resourcePath,
java.nio.file.Path outputPath,
java.nio.file.StandardCopyOption option)
Extracts a resource from a Path in the JAR archive to outputPath.
|
static java.io.InputStream |
extractResourceAsStream(java.lang.String name)
Extract the contents of a resource file to an InputStream.
|
static void |
extractZipResource(java.lang.String zipResource,
java.nio.file.Path destinationDirectory)
Extract the contents of a .zip resource file to a destination directory.
|
public static void extractZipResource(java.lang.String zipResource,
java.nio.file.Path destinationDirectory)
throws java.io.IOException,
java.lang.IllegalArgumentException
Overwrite existing files.
zipResource - Must end with ".zip".destinationDirectory - The path of the destination directory, which must exist.java.io.IOExceptionjava.lang.IllegalArgumentExceptionpublic static void extractMissingResources(java.nio.file.Path assetPath)
assetPath - Path to extract items from the jarpublic static boolean extractResource(java.nio.file.Path resourcePath,
java.nio.file.Path outputPath,
java.nio.file.StandardCopyOption option)
resourcePath - Path -- In-JAR path of the resource to extractoutputPath - Path -- Path to extract the resource tooption - StandardCopyOptionpublic static java.io.InputStream extractResourceAsStream(java.lang.String name)
throws java.io.IOException
name - Name of resource.java.io.IOException