- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.sun.enterprise.util.zip.ZipWriter
类的一些代码示例,展示了ZipWriter
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipWriter
类的具体详情如下:
包路径:com.sun.enterprise.util.zip.ZipWriter
类名称:ZipWriter
暂无
代码示例来源:origin: eclipse-ee4j/glassfish
public static void main(String[] args) {
if (args == null || args.length != 2) {
usage();
return;
}
try {
ZipWriter zw = new ZipWriter(args[0], args[1]);
zw.write();
}
catch (ZipFileException e) {
// nothing to do.
}
}
代码示例来源:origin: stackoverflow.com
response.setProperty("Content-Disposition", "attachment; filename=myarchive.zip");
response.setContentType("application/zip");
final ZipWriter writer = ZipWriterFactoryUtil.getZipWriter();
for (String filename : xmls) {
byte[] file = FileUtil.getBytes(new File("filename"));
writer.addEntry(filename, file);
}
byte[] archive = writer.finish();
response.getPortletOutputStream().write(archive);
代码示例来源:origin: org.glassfish.common/common-util
public ZipWriter(OutputStream outStream, String dirName, String[] fileList) throws ZipFileException
{
init(outStream, dirName);
createItemList(fileList);
}
代码示例来源:origin: org.glassfish.main.common/common-util
public void write() throws ZipFileException {
try {
setupZipStream();
for (int i = 0; i < items.length; i++) {
addEntry(items[i]);
}
}
catch (ZipFileException z) {
throw z;
}
catch (Exception e) {
throw new ZipFileException(e);
}
finally {
close();
}
}
代码示例来源:origin: org.glassfish.main.admin/backup
ZipWriter writer = new ZipWriter(zipName, domainDirName, files);
writer.excludeDirs(request.excludeDirs);
writer.safeWrite();
代码示例来源:origin: org.glassfish.main.cluster/cluster-cli
filesToZip = resultFiles.toArray(filesToZip);
ZipWriter writer = new ZipWriter(FileUtils.safeGetCanonicalPath(glassFishZipFile), installRoot.toString(), filesToZip);
writer.safeWrite();
logger.info("Created installation zip " + FileUtils.safeGetCanonicalPath(glassFishZipFile));
代码示例来源:origin: org.glassfish.common/common-util
public ZipWriter(String zipFilename, String dirName, ZipItem[] theItems) throws ZipFileException
{
items = theItems;
init(zipFilename, dirName);
}
代码示例来源:origin: org.glassfish.common/common-util
public void write() throws ZipFileException
{
try
{
for(int i = 0; i < items.length; i++)
{
addEntry(items[i]);
}
zipStream.close();
}
catch(ZipFileException z)
{
throw z;
}
catch(Exception e)
{
throw new ZipFileException(e);
}
}
代码示例来源:origin: eclipse-ee4j/glassfish
public void write() throws ZipFileException {
try {
setupZipStream();
for (int i = 0; i < items.length; i++) {
addEntry(items[i]);
}
}
catch (ZipFileException z) {
throw z;
}
catch (Exception e) {
throw new ZipFileException(e);
}
finally {
close();
}
}
代码示例来源:origin: eclipse-ee4j/glassfish
public ZipWriter(String zipFilename, String dirName, ZipItem[] theItems) throws ZipFileException {
items = theItems;
init(zipFilename, dirName);
}
代码示例来源:origin: org.glassfish.common/common-util
addEntry(items[i]);
代码示例来源:origin: org.glassfish.main.common/common-util
public static void main(String[] args) {
if (args == null || args.length != 2) {
usage();
return;
}
try {
ZipWriter zw = new ZipWriter(args[0], args[1]);
zw.write();
}
catch (ZipFileException e) {
// nothing to do.
}
}
代码示例来源:origin: org.glassfish.common/common-util
public ZipWriter(String zipFilename, String dirName) throws ZipFileException
{
init(zipFilename, dirName);
createItemList(null);
}
代码示例来源:origin: org.glassfish.main.common/common-util
/**
* Does not throw an exception when there is a duplicate zip entry.
*
* @throws ZipFileException if an error while creating the archive
*/
public void safeWrite() throws ZipFileException {
try {
setupZipStream();
for (int i = 0; i < items.length; i++) {
try {
addEntry(items[i]);
}
catch (ZipException e) {
// ignore - duplicate zip entry
}
}
}
catch (ZipFileException z) {
throw z;
}
catch (Exception e) {
throw new ZipFileException(e);
}
finally {
close();
}
}
代码示例来源:origin: org.glassfish.main.common/common-util
public ZipWriter(String zipFilename, String dirName, ZipItem[] theItems) throws ZipFileException {
items = theItems;
init(zipFilename, dirName);
}
代码示例来源:origin: org.glassfish.common/common-util
public static void main(String[] args)
{
if(args == null || args.length != 2)
usage();
try
{
ZipWriter zw = new ZipWriter(args[0], args[1]);
zw.write();
}
catch(ZipFileException e)
{
System.exit(0);
}
}
代码示例来源:origin: org.glassfish.common/common-util
public ZipWriter(String zipFilename, String dirName, String[] fileList) throws ZipFileException
{
init(zipFilename, dirName);
createItemList(fileList);
}
代码示例来源:origin: eclipse-ee4j/glassfish
/**
* Does not throw an exception when there is a duplicate zip entry.
*
* @throws ZipFileException if an error while creating the archive
*/
public void safeWrite() throws ZipFileException {
try {
setupZipStream();
for (int i = 0; i < items.length; i++) {
try {
addEntry(items[i]);
}
catch (ZipException e) {
// ignore - duplicate zip entry
}
}
}
catch (ZipFileException z) {
throw z;
}
catch (Exception e) {
throw new ZipFileException(e);
}
finally {
close();
}
}
代码示例来源:origin: org.glassfish.main.common/common-util
private void init(String outFileName, String dirName) throws ZipFileException {
try {
// ambiguous overload of the 2 init methods if the first arg is plain null.
init((OutputStream)null, dirName);
userOutFile = new File(outFileName);
}
catch (Exception e) {
throw new ZipFileException(e);
}
}
代码示例来源:origin: org.glassfish.main.common/common-util
public ZipWriter(String zipFilename, String dirName) throws ZipFileException {
init(zipFilename, dirName);
createItemList(null);
}
Enterprise Architect 中的原型(prototype)“主文档”和“报告包”有什么区别?我将从多个模型文档生成一个文档,我想更好地组织它们以模仿生成的文档的结构。我认为创建“报告包”
Stackoverflow 上有几个问题询问 x ( Ruby/Drupal ) 技术是否已“企业就绪”。 我想问一下“企业就绪”是如何定义的。 有人创建了自己的 list 吗? 有人有测试的基准吗?
我要为我的 EA 项目创建一个脚本。为此,有必要创建一个新的“组”,您可以在该组中添加自己的脚本。 我在硬盘上找到的本地脚本。它们位于 EA-install-dir/Scritps 中。 但是我在哪里
我定义了一个带有操作的类,操作在几个时序图中使用。 有没有办法找出有多少序列图正在使用一个特定的操作? 最佳答案 如果我的理解正确,您应该能够执行以下操作: 在“项目浏览器”中展开您的类以查看操作 右
问题:我们的许多设计和架构文档都是在 Enterprise Architect 中创建和维护的。 ——无论好坏,就是这样。这些文档存储在我们的 subversion 存储库中——这对于创建和更新它们的
运行 Github Enterprise 2.18。有什么方法可以通过 API 确定用户处于休眠状态吗?我在任何地方都没有看到对它的具体调用... 最佳答案 为了回答你的问题...... Runnin
我有一个很大的遗留项目。 我加载了整个项目:Project->Source Code Engineering->Import Source Directory:(c++) & (path) 有没有一种
我的元素有 10 个或更多标记值,而不是一次删除一个,有没有办法同时删除它们? 最佳答案 正如 Uffe 指出的那样,您可以使用脚本来完成此操作。有关 EA 脚本的更多信息,请参阅 the EA Us
我有一些代码,我想创建Property Note var metric as EA.Element; metric = thePackage.Elements.AddNew("", "Text")
我正在尝试将一个图表中的用例链接到详细说明该用例的图表。 我正在做的是: 创建新的用例图(右键单击模型 -> 添加 -> 添加图) 将图表称为“测试” 在图表中添加用例(在图表中单击右键 -> 新建元
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引起辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the he
我无法在“Enterprise Architect”(Sparx Systems)生成的类图中显示参数的名称。我正在尝试在下面添加一个操作 + delayFight(numberOfMinutes:
我正在阅读 Scylla 的文档,因为我们正计划从 DSE 迁移到本地 Scylla。然而,in their documentation ,他们说不支持 DSE SSTable 格式。 Here他们提
在模型搜索功能中似乎没有办法将结果限制为特定类型,例如类,节点等。有办法实现吗?我知道我可以制作一个 SQL 查询,但是无法找到正确的表名。 编辑 看来我可以做到以下几点 选择 *, Object_T
一些扩展 GitHub Enterprise 的服务需要足够新的版本。但作为 GH:E 的标准用户,我如何在不干扰管理员的情况下确定我的公司安装了哪个版本? 最佳答案 我正在为我们的 github 企
我正在阅读 Scylla 的文档,因为我们正计划从 DSE 迁移到本地 Scylla。然而,in their documentation ,他们说不支持 DSE SSTable 格式。 Here他们提
我有一个 54 页的 UML 图要打印。我想缩小图像大小或页面大小,以便打印不超过 12 页?有没有办法做到这一点? 最佳答案 开图 使用图->属性 在图表选项卡上,单击页面设置下的“高级...” 单
我有一个用例图,其中用例具有扩展关系。我想知道是否有任何 API 可用于了解将哪个扩展点设置为特定的扩展关系(在许多可以应用的扩展点中)。下面显示了用例图以及突出显示的扩展点。 最佳答案 假设这是一个
我正在尝试使用 Microsoft Enterprise Library 中的 DatabaseFactory 方法。 using Microsoft.Practices.EnterpriseLibr
有谁知道如何在使用 amazon ec2 M3.Xlarge 机器的集群中使用 Datastax 企业(使用 opscenter)? 当我尝试使用这些类型的实例(使用 ssd)时,出现以下错误: 启动
我是一名优秀的程序员,十分优秀!