本文整理了Java中org.apache.openejb.loader.Zips
类的一些代码示例,展示了Zips
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zips
类的具体详情如下:
包路径:org.apache.openejb.loader.Zips
类名称:Zips
暂无
代码示例来源:origin: org.apache.openejb/openejb-loader
public static void unzip(final File zipFile, final File destination) throws IOException {
unzip(zipFile, destination, false);
}
代码示例来源:origin: org.apache.tomee/openejb-loader
public static void unzip(final File zipFile, final File destination) throws IOException {
unzip(zipFile, destination, false);
}
代码示例来源:origin: com.github.httpmock/mock-http-server-exec
void unzip(File distribOutput, String distrib) throws IOException {
ClassLoader contextClassLoader = getClassLoader();
InputStream distribIs = contextClassLoader.getResourceAsStream(distrib);
Zips.unzip(distribIs, distribOutput, false);
}
代码示例来源:origin: org.apache.tomee/openejb-loader
private static Collection<String> extract(final String zip) throws IOException {
final File tmp = new File(SystemInstance.get().getBase().getDirectory(), ProvisioningResolver.TEMP_DIR);
if (!tmp.exists()) {
try {
Files.mkdirs(tmp);
} catch (final Files.FileRuntimeException fre) {
// ignored
}
}
final File zipFile = new File(zip);
final File extracted = new File(tmp, zipFile.getName().replace(".zip", ""));
if (extracted.exists()) {
return list(extracted);
} else {
Files.mkdirs(extracted);
}
Zips.unzip(zipFile, extracted);
return list(extracted);
}
代码示例来源:origin: org.apache.openejb/openejb-loader
private static Collection<String> extract(final String zip) throws IOException {
final File tmp = new File(SystemInstance.get().getBase().getDirectory(), TEMP_DIR);
if (!tmp.exists()) {
try {
Files.mkdirs(tmp);
} catch (final Files.FileRuntimeException fre) {
// ignored
}
}
final File zipFile = new File(realLocation(zip));
final File extracted = new File(tmp, zipFile.getName().replace(".zip", ""));
if (extracted.exists()) {
return list(extracted);
} else {
Files.mkdirs(extracted);
}
Zips.unzip(zipFile, extracted);
return list(extracted);
}
代码示例来源:origin: org.apache.tomee/openejb-core
Zips.unzip(file, destinationDir);
} catch (final IOException e) {
代码示例来源:origin: org.apache.openejb/openejb-core
Zips.unzip(file, destinationDir);
} catch (final IOException e) {
代码示例来源:origin: org.apache.tomee/openejb-loader
public static void unzip(final File zipFile, final File destination, final boolean noparent) throws IOException {
Files.dir(destination);
Files.writable(destination);
Files.file(zipFile);
Files.readable(zipFile);
final InputStream read = IO.read(zipFile);
try {
unzip(read, destination, noparent);
} finally {
IO.close(read);
}
}
代码示例来源:origin: org.apache.openejb/openejb-loader
public static void unzip(final File zipFile, final File destination, final boolean noparent) throws IOException {
Files.dir(destination);
Files.writable(destination);
Files.file(zipFile);
Files.readable(zipFile);
final InputStream read = IO.read(zipFile);
try {
unzip(read, destination, noparent);
} finally {
IO.close(read);
}
}
内容来源于网络,如有侵权,请联系作者删除!