public class ZipUtils
extends java.lang.Object
Title: Framework Support Library
Description: Defines ZIP utility for easy extract/compress of ZIP files.
Copyright: Copyright (c) 2014
Company: StreamScape Technologies
Modifier and Type | Field and Description |
---|---|
static char |
ZIP_FILE_SEPARATOR |
Constructor and Description |
---|
ZipUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
compress(java.io.File sourceFile,
java.io.File targetFile)
Compresses a content at the specified path (file or folder) and creates a target ZIP file at the specified path.
|
static void |
compress(java.lang.String sourcePath,
java.lang.String targetPath,
FileSystem sourceFileSystem,
FileSystem targetFileSystem) |
static void |
extract(java.io.File sourcePath,
java.io.File targetDir)
Extracts a content of the specified ZIP file and puts these extracted files to the target dir.
|
static void |
extract(java.lang.String sourceFile,
java.lang.String targetDir,
FileSystem sourceFileSystem,
FileSystem targetFileSystem) |
static java.util.List |
listZipFileEntries(java.lang.String file,
FileSystem fileSystem) |
public static final char ZIP_FILE_SEPARATOR
public static void compress(java.io.File sourceFile, java.io.File targetFile) throws java.io.IOException
sourcePath
- the path with the content which need to be compressedtargetFile
- the path to the result ZIP file.java.io.IOException
public static void compress(java.lang.String sourcePath, java.lang.String targetPath, FileSystem sourceFileSystem, FileSystem targetFileSystem) throws java.io.IOException
java.io.IOException
public static void extract(java.io.File sourcePath, java.io.File targetDir) throws java.io.IOException
sourceFile
- the path to the source ZIP file to be extracted.targetDir
- the folder with extracted files.java.io.IOException
public static void extract(java.lang.String sourceFile, java.lang.String targetDir, FileSystem sourceFileSystem, FileSystem targetFileSystem) throws java.io.IOException
java.io.IOException
public static java.util.List listZipFileEntries(java.lang.String file, FileSystem fileSystem) throws java.io.IOException
java.io.IOException
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.