本文整理了Java中org.ops4j.io.ZipExploder.processFile()
方法的一些代码示例,展示了ZipExploder.processFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipExploder.processFile()
方法的具体详情如下:
包路径:org.ops4j.io.ZipExploder
类名称:ZipExploder
方法名:processFile
[英]Explode source ZIP or JAR file into a target directory
[中]将源ZIP或JAR文件分解到目标目录中
代码示例来源:origin: org.ops4j.base/ops4j-base-io
/**
* Explode source JAR files into a target directory
*
* @param jarFiles
* list of source files
* @param destDir
* target directory name (should already exist)
* @exception IOException
* error creating a target file
*/
public void processJars(File[] jarFiles, File destDir) throws IOException {
for (int i = 0; i < jarFiles.length; i++) {
processFile(jarFiles[i], destDir);
}
}
代码示例来源:origin: org.ops4j.base/ops4j-base-io
/**
* Explode source ZIP files into a target directory
*
* @param zipFiles
* list of source files
* @param destDir
* target directory name (should already exist)
* @exception IOException
* error creating a target file
*/
public void processZips(File[] zipFiles, File destDir) throws IOException {
for (int i = 0; i < zipFiles.length; i++) {
processFile(zipFiles[i], destDir);
}
}
代码示例来源:origin: org.ops4j.base/ops4j-base-io
/**
* Explode source ZIP or JAR file into a target directory
*
* @param zipName
* names of source file
* @param destDir
* target directory name (should already exist)
* @exception IOException
* error creating a target file
* @deprecated use {@link #processFile(File, File)} for a type save variant
*/
@Deprecated
public void processFile(String zipName, String destDir) throws IOException {
//Delegation to preferred method
processFile(new File(zipName), new File(destDir));
}
代码示例来源:origin: ops4j/org.ops4j.pax.exam2
/**
* Download and unpacks the archive.
*
* @throws IOException on I/O errors
*/
public void downloadAndInstall() throws IOException {
installDir.mkdirs();
File tempFile = File.createTempFile("pax-exam", ".zip");
FileOutputStream os = null;
LOG.info("downloading {} to {}", zipUrl, tempFile);
try {
os = new FileOutputStream(tempFile);
StreamUtils.copyStream(zipUrl.openStream(), os, true);
LOG.info("unzipping into {}", installDir);
ZipExploder exploder = new ZipExploder();
exploder.processFile(tempFile, installDir);
}
finally {
tempFile.delete();
}
}
}
代码示例来源:origin: org.ops4j.pax.exam/pax-exam
/**
* Download and unpacks the archive.
*
* @throws IOException on I/O errors
*/
public void downloadAndInstall() throws IOException {
installDir.mkdirs();
File tempFile = File.createTempFile("pax-exam", ".zip");
FileOutputStream os = null;
LOG.info("downloading {} to {}", zipUrl, tempFile);
try {
os = new FileOutputStream(tempFile);
StreamUtils.copyStream(zipUrl.openStream(), os, true);
LOG.info("unzipping into {}", installDir);
ZipExploder exploder = new ZipExploder();
exploder.processFile(tempFile, installDir);
}
finally {
tempFile.delete();
}
}
}
代码示例来源:origin: ops4j/org.ops4j.pax.exam2
/**
* Download and unpacks the archive.
*
* @throws IOException on I/O errors
*/
public void downloadAndInstall() throws IOException {
installDir.mkdirs();
File tempFile = File.createTempFile("pax-exam", ".zip");
FileOutputStream os = null;
LOG.info("downloading {} to {}", zipUrl, tempFile);
try {
os = new FileOutputStream(tempFile);
StreamUtils.copyStream(zipUrl.openStream(), os, true);
LOG.info("unzipping into {}", installDir);
ZipExploder exploder = new ZipExploder();
exploder.processFile(tempFile, installDir);
}
finally {
tempFile.delete();
}
}
}
代码示例来源:origin: ops4j/org.ops4j.pax.exam2
exploder.processFile(file, webResourceDir);
内容来源于网络,如有侵权,请联系作者删除!