- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.jboss.as.patching.ZipUtils
类的一些代码示例,展示了ZipUtils
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipUtils
类的具体详情如下:
包路径:org.jboss.as.patching.ZipUtils
类名称:ZipUtils
暂无
代码示例来源:origin: wildfly/wildfly-core
/**
* unpack...
*
* @param zip the zip
* @param patchDir the patch dir
* @throws IOException
*/
public static void unzip(final File zip, final File patchDir) throws IOException {
try (final ZipFile zipFile = new ZipFile(zip)){
unzip(zipFile, patchDir);
}
}
代码示例来源:origin: wildfly/wildfly-core
private static void addDirectoryToZip(File dir, String dirName, ZipOutputStream zos) throws IOException {
final ZipEntry dirEntry = new ZipEntry(dirName + "/");
zos.putNextEntry(dirEntry);
zos.closeEntry();
File[] children = dir.listFiles();
if (children != null) {
for (File file : children) {
if (file.isDirectory()) {
addDirectoryToZip(file, dirName + "/" + file.getName(), zos);
} else {
addFileToZip(file, dirName, zos);
}
}
}
}
代码示例来源:origin: org.jboss.as/patch-gen
if (existing != null && existing.exists()) {
ZipUtils.unzip(existing, multiPatchContent);
for (final File patch : patches) {
final File patchContent = new File(tmp, "patch-content-" + i);
ZipUtils.unzip(patch, patchContent);
ZipUtils.zip(multiPatchContent, target);
代码示例来源:origin: wildfly/wildfly-core
public static File createZippedPatchFile(File sourceDir, String zipFileName) {
//tree(sourceDir);
File zipFile = new File(sourceDir.getParent(), zipFileName + ".zip");
ZipUtils.zip(sourceDir, zipFile);
return zipFile;
}
代码示例来源:origin: org.wildfly.core/wildfly-patching
ZipUtils.zip(mergedDir, merged);
IoUtils.recursiveDelete(workDir);
return merged;
代码示例来源:origin: wildfly/wildfly-core
ZipUtils.zip(mergedDir, merged);
IoUtils.recursiveDelete(workDir);
return merged;
代码示例来源:origin: org.wildfly.core/wildfly-patching
/**
* unpack...
*
* @param zip the zip
* @param patchDir the patch dir
* @throws IOException
*/
public static void unzip(final File zip, final File patchDir) throws IOException {
try (final ZipFile zipFile = new ZipFile(zip)){
unzip(zipFile, patchDir);
}
}
代码示例来源:origin: org.wildfly.core/wildfly-patching
private static void addDirectoryToZip(File dir, String dirName, ZipOutputStream zos) throws IOException {
final ZipEntry dirEntry = new ZipEntry(dirName + "/");
zos.putNextEntry(dirEntry);
zos.closeEntry();
File[] children = dir.listFiles();
if (children != null) {
for (File file : children) {
if (file.isDirectory()) {
addDirectoryToZip(file, dirName + "/" + file.getName(), zos);
} else {
addFileToZip(file, dirName, zos);
}
}
}
}
代码示例来源:origin: wildfly/wildfly-core
final String path = patchId + ".zip";
final File patchOutput = new File(tempDir, path);
ZipUtils.zip(step.getPatchDir(), patchOutput);
entries.add(new BundledPatch.BundledPatchEntry(patchId, path));
ZipUtils.zip(tempDir, result);
return result;
代码示例来源:origin: wildfly/wildfly-core
private static File expandContent(File patchFile, final File workDir, final String expandDirName) throws PatchingException {
final File patchDir;
try {
if (!patchFile.isDirectory()) {
patchDir = new File(workDir, expandDirName);
// Save the content
final File cachedContent = new File(patchDir, "content");
IoUtils.copy(patchFile, cachedContent);
// Unpack to the work dir
ZipUtils.unzip(cachedContent, patchDir);
} else {
patchDir = patchFile;
}
} catch (IOException e) {
throw new PatchingException("Failed to unzip " + patchFile.getAbsolutePath());
}
return patchDir;
}
代码示例来源:origin: org.wildfly.core/wildfly-patching
public static void zip(File sourceDir, File zipFile) {
try (final FileOutputStream os = new FileOutputStream(zipFile);
final ZipOutputStream zos = new ZipOutputStream(new BufferedOutputStream(os))
) {
for (final File file : sourceDir.listFiles()) {
if (file.isDirectory()) {
addDirectoryToZip(file, file.getName(), zos);
} else {
addFileToZip(file, null, zos);
}
}
} catch (IOException e) {
throw new RuntimeException("Failed creating patch file " + zipFile, e); // Only used for generation and tests
}
}
代码示例来源:origin: org.jboss.as/patch-gen
PatchMerger.merge(previousCp, tmp, patchFile);
} else {
ZipUtils.zip(tmp, patchFile);
代码示例来源:origin: org.wildfly.core/wildfly-patching
private static File expandContent(File patchFile, final File workDir, final String expandDirName) throws PatchingException {
final File patchDir;
try {
if (!patchFile.isDirectory()) {
patchDir = new File(workDir, expandDirName);
// Save the content
final File cachedContent = new File(patchDir, "content");
IoUtils.copy(patchFile, cachedContent);
// Unpack to the work dir
ZipUtils.unzip(cachedContent, patchDir);
} else {
patchDir = patchFile;
}
} catch (IOException e) {
throw new PatchingException("Failed to unzip " + patchFile.getAbsolutePath());
}
return patchDir;
}
代码示例来源:origin: wildfly/wildfly-core
public static void zip(File sourceDir, File zipFile) {
try (final FileOutputStream os = new FileOutputStream(zipFile);
final ZipOutputStream zos = new ZipOutputStream(new BufferedOutputStream(os))
) {
for (final File file : sourceDir.listFiles()) {
if (file.isDirectory()) {
addDirectoryToZip(file, file.getName(), zos);
} else {
addFileToZip(file, null, zos);
}
}
} catch (IOException e) {
throw new RuntimeException("Failed creating patch file " + zipFile, e); // Only used for generation and tests
}
}
代码示例来源:origin: org.wildfly.core/wildfly-patching
private PatchingResult applyPatch(final File parentWorkDir, final InputStream is, final ContentVerificationPolicy contentPolicy) throws PatchingException {
File workDir = null;
try {
// Create a working dir
workDir = parentWorkDir == null ? IdentityPatchRunner.createTempDir() : IdentityPatchRunner.createTempDir(parentWorkDir);
try {
// Save the content
Path cachedContent = workDir.toPath().resolve("content");
Files.copy(is, cachedContent);
// Unpack to the work dir
ZipUtils.unzip(cachedContent.toFile(), workDir);
} catch (IOException e) {
throw PatchLogger.ROOT_LOGGER.cannotCopyFilesToTempDir(workDir.getAbsolutePath(), e.getMessage(), e); // add info that temp dir is involved
}
// Execute
return execute(workDir, contentPolicy);
} catch (Exception e) {
throw rethrowException(e);
} finally {
if (workDir != null && !IoUtils.recursiveDelete(workDir)) {
PatchLogger.ROOT_LOGGER.cannotDeleteFile(workDir.getAbsolutePath());
}
}
}
代码示例来源:origin: wildfly/wildfly-core
private PatchingResult applyPatch(final File parentWorkDir, final InputStream is, final ContentVerificationPolicy contentPolicy) throws PatchingException {
File workDir = null;
try {
// Create a working dir
workDir = parentWorkDir == null ? IdentityPatchRunner.createTempDir() : IdentityPatchRunner.createTempDir(parentWorkDir);
try {
// Save the content
Path cachedContent = workDir.toPath().resolve("content");
Files.copy(is, cachedContent);
// Unpack to the work dir
ZipUtils.unzip(cachedContent.toFile(), workDir);
} catch (IOException e) {
throw PatchLogger.ROOT_LOGGER.cannotCopyFilesToTempDir(workDir.getAbsolutePath(), e.getMessage(), e); // add info that temp dir is involved
}
// Execute
return execute(workDir, contentPolicy);
} catch (Exception e) {
throw rethrowException(e);
} finally {
if (workDir != null && !IoUtils.recursiveDelete(workDir)) {
PatchLogger.ROOT_LOGGER.cannotDeleteFile(workDir.getAbsolutePath());
}
}
}
本文整理了Java中jodd.io.ZipUtil.addToZip()方法的一些代码示例,展示了ZipUtil.addToZip()的具体用法。这些代码示例主要来源于Github/Stackover
本文整理了Java中jodd.io.ZipUtil.addFolderToZip()方法的一些代码示例,展示了ZipUtil.addFolderToZip()的具体用法。这些代码示例主要来源于Gith
本文整理了Java中jodd.io.ZipUtil.close()方法的一些代码示例,展示了ZipUtil.close()的具体用法。这些代码示例主要来源于Github/Stackoverflow/M
本文整理了Java中jodd.io.ZipUtil.unzip()方法的一些代码示例,展示了ZipUtil.unzip()的具体用法。这些代码示例主要来源于Github/Stackoverflow/M
本文整理了Java中jodd.io.ZipUtil.zlib()方法的一些代码示例,展示了ZipUtil.zlib()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Mav
本文整理了Java中jodd.io.ZipUtil.gzip()方法的一些代码示例,展示了ZipUtil.gzip()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Mav
本文整理了Java中jodd.io.ZipUtil.ungzip()方法的一些代码示例,展示了ZipUtil.ungzip()的具体用法。这些代码示例主要来源于Github/Stackoverflow
本文整理了Java中jodd.io.ZipUtil.zip()方法的一些代码示例,展示了ZipUtil.zip()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven
本文整理了Java中org.zeroturnaround.zip.ZipUtil.pack()方法的一些代码示例,展示了ZipUtil.pack()的具体用法。这些代码示例主要来源于Github/St
本文整理了Java中org.zeroturnaround.zip.ZipUtil.unpackEntry()方法的一些代码示例,展示了ZipUtil.unpackEntry()的具体用法。这些代码示例
本文整理了Java中org.zeroturnaround.zip.ZipUtil.removeEntry()方法的一些代码示例,展示了ZipUtil.removeEntry()的具体用法。这些代码示例
本文整理了Java中org.zeroturnaround.zip.ZipUtil.packEntries()方法的一些代码示例,展示了ZipUtil.packEntries()的具体用法。这些代码示例
本文整理了Java中org.zeroturnaround.zip.ZipUtil.containsEntry()方法的一些代码示例,展示了ZipUtil.containsEntry()的具体用法。这些
本文整理了Java中org.zeroturnaround.zip.ZipUtil.unpack()方法的一些代码示例,展示了ZipUtil.unpack()的具体用法。这些代码示例主要来源于Githu
本文整理了Java中org.zeroturnaround.zip.ZipUtil.addOrReplaceEntries()方法的一些代码示例,展示了ZipUtil.addOrReplaceEntri
本文整理了Java中org.zeroturnaround.zip.ZipUtil.iterate()方法的一些代码示例,展示了ZipUtil.iterate()的具体用法。这些代码示例主要来源于Git
本文整理了Java中org.openl.util.ZipUtils.archive()方法的一些代码示例,展示了ZipUtils.archive()的具体用法。这些代码示例主要来源于Github/St
本文整理了Java中org.openl.util.ZipUtils.extractAll()方法的一些代码示例,展示了ZipUtils.extractAll()的具体用法。这些代码示例主要来源于Git
本文整理了Java中org.mule.tck.ZipUtils.compress()方法的一些代码示例,展示了ZipUtils.compress()的具体用法。这些代码示例主要来源于Github/St
本文整理了Java中aQute.lib.zip.ZipUtil.setModifiedTime()方法的一些代码示例,展示了ZipUtil.setModifiedTime()的具体用法。这些代码示例主
我是一名优秀的程序员,十分优秀!