- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.dihedron.core.zip.ZipArchive.addFile()
方法的一些代码示例,展示了ZipArchive.addFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipArchive.addFile()
方法的具体详情如下:
包路径:org.dihedron.core.zip.ZipArchive
类名称:ZipArchive
方法名:addFile
[英]Adds the contents of a ByteArrayOutputStream to the ZIP archive.
[中]将ByteArrayOutputStream的内容添加到ZIP存档。
代码示例来源:origin: org.dihedron.commons/dihedron-commons
/**
* Adds multiple files to the ZIP archive, given their names.
* @param filenames
* The Strings representing eth file names.
*/
public void addFiles(String[] filenames) throws IOException {
for (int i = 0; i < filenames.length; i++) {
addFile(null, filenames[i]);
}
}
代码示例来源:origin: org.dihedron.commons/base
/**
* Adds multiple files to the ZIP archive, given their names.
* @param files
* The File objects representing the files.
*/
public void addFiles(File[] files) throws IOException {
for (int i = 0; i < files.length; i++) {
addFile(null, files[i]);
}
}
代码示例来源:origin: org.dihedron.commons/dihedron-core
/**
* Adds multiple files to the ZIP archive, given their names.
* @param filenames
* The Strings representing eth file names.
*/
public void addFiles(String[] filenames) throws IOException {
for (int i = 0; i < filenames.length; i++) {
addFile(null, filenames[i]);
}
}
代码示例来源:origin: org.dihedron.commons/base
/**
* Adds multiple files to the ZIP archive, given their names.
* @param filenames
* The Strings representing eth file names.
*/
public void addFiles(String[] filenames) throws IOException {
for (int i = 0; i < filenames.length; i++) {
addFile(null, filenames[i]);
}
}
代码示例来源:origin: org.dihedron.commons/dihedron-core
/**
* Adds multiple files to the ZIP archive, given their names.
* @param files
* The File objects representing the files.
*/
public void addFiles(File[] files) throws IOException {
for (int i = 0; i < files.length; i++) {
addFile(null, files[i]);
}
}
代码示例来源:origin: org.dihedron.commons/dihedron-commons
/**
* Adds multiple files to the ZIP archive, given their names.
* @param files
* The File objects representing the files.
*/
public void addFiles(File[] files) throws IOException {
for (int i = 0; i < files.length; i++) {
addFile(null, files[i]);
}
}
代码示例来源:origin: org.dihedron.commons/dihedron-core
/**
* Adds a file to a ZIP archive, given its path.
*
* @param zipEntry
* the name of the entry in the archive; if null, the name of the original
* file is used.
* @param filename
* The path of a file to be added to the ZIP archive.
*/
public void addFile(String zipEntry, String filename) throws IOException {
addFile(zipEntry, new File(filename));
}
代码示例来源:origin: org.dihedron.commons/dihedron-core
/**
* Adds the contents of a ByteArrayOutputStream to the ZIP archive.
*
* @param zipEntry
* name of the entry in the archive.
* @param baos
* ByteArrayOutputStream to be added to the archive.
*/
public void addFile(String zipEntry, ByteArrayOutputStream baos) throws IOException {
addFile(zipEntry, baos.toByteArray());
}
代码示例来源:origin: org.dihedron.commons/dihedron-commons
/**
* Adds the contents of a ByteArrayOutputStream to the ZIP archive.
*
* @param zipEntry
* name of the entry in the archive.
* @param baos
* ByteArrayOutputStream to be added to the archive.
*/
public void addFile(String zipEntry, ByteArrayOutputStream baos) throws IOException {
addFile(zipEntry, baos.toByteArray());
}
代码示例来源:origin: org.dihedron.commons/base
/**
* Adds the contents of a ByteArrayOutputStream to the ZIP archive.
*
* @param zipEntry
* name of the entry in the archive.
* @param baos
* ByteArrayOutputStream to be added to the archive.
*/
public void addFile(String zipEntry, ByteArrayOutputStream baos) throws IOException {
addFile(zipEntry, baos.toByteArray());
}
代码示例来源:origin: org.dihedron.commons/base
/**
* Adds a file to a ZIP archive, given its path.
*
* @param zipEntry
* the name of the entry in the archive; if null, the name of the original
* file is used.
* @param filename
* The path of a file to be added to the ZIP archive.
*/
public void addFile(String zipEntry, String filename) throws IOException {
addFile(zipEntry, new File(filename));
}
代码示例来源:origin: org.dihedron.commons/dihedron-commons
/**
* Adds a file to a ZIP archive, given its path.
*
* @param zipEntry
* the name of the entry in the archive; if null, the name of the original
* file is used.
* @param filename
* The path of a file to be added to the ZIP archive.
*/
public void addFile(String zipEntry, String filename) throws IOException {
addFile(zipEntry, new File(filename));
}
代码示例来源:origin: org.dihedron.commons/dihedron-commons
/**
* Adds a text file (encoded as a list of strings) to the archive.
* @param zipEntry
* New entry name in the archive.
* @param text
* A list of Strings to be added as a text file to the archive.
* @return
*/
public void addTextFile(String zipEntry, String[] text) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintWriter writer = new PrintWriter(baos);
for (int i = 0; i < text.length; i++) {
// add the line
writer.write(text[i] + "\n");
}
writer.close();
addFile(zipEntry, baos);
}
代码示例来源:origin: org.dihedron.commons/base
/**
* Adds a text file (encoded as a list of strings) to the archive.
* @param zipEntry
* New entry name in the archive.
* @param text
* A list of Strings to be added as a text file to the archive.
* @return
*/
public void addTextFile(String zipEntry, String[] text) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintWriter writer = new PrintWriter(baos);
for (int i = 0; i < text.length; i++) {
// add the line
writer.write(text[i] + "\n");
}
writer.close();
addFile(zipEntry, baos);
}
代码示例来源:origin: org.dihedron.commons/dihedron-core
/**
* Adds a text file (encoded as a list of strings) to the archive.
* @param zipEntry
* New entry name in the archive.
* @param text
* A list of Strings to be added as a text file to the archive.
* @return
*/
public void addTextFile(String zipEntry, String[] text) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintWriter writer = new PrintWriter(baos);
for (int i = 0; i < text.length; i++) {
// add the line
writer.write(text[i] + "\n");
}
writer.close();
addFile(zipEntry, baos);
}
代码示例来源:origin: org.dihedron.commons/dihedron-core
if(value instanceof byte[]) {
logger.debug("adding '{}' defined as byte[]", zipEntry);
addFile(zipEntry, (byte[])value);
} else if(value instanceof ByteArrayOutputStream) {
logger.debug("adding '{}', defined as ByteArrayOutputStream", zipEntry);
addFile(zipEntry, (ByteArrayOutputStream)value);
} else if(value instanceof File) {
logger.debug("adding '{}', defined as File", zipEntry);
addFile(zipEntry, (File)value);
} else if(value instanceof String) {
logger.debug("adding '{}', defined as String (path)", zipEntry);
addFile(zipEntry, (String)value);
} else {
logger.error("unsupported data type for {}", zipEntry);
代码示例来源:origin: org.dihedron.commons/base
if(value instanceof byte[]) {
logger.debug("adding '{}' defined as byte[]", zipEntry);
addFile(zipEntry, (byte[])value);
} else if(value instanceof ByteArrayOutputStream) {
logger.debug("adding '{}', defined as ByteArrayOutputStream", zipEntry);
addFile(zipEntry, (ByteArrayOutputStream)value);
} else if(value instanceof File) {
logger.debug("adding '{}', defined as File", zipEntry);
addFile(zipEntry, (File)value);
} else if(value instanceof String) {
logger.debug("adding '{}', defined as String (path)", zipEntry);
addFile(zipEntry, (String)value);
} else {
logger.error("unsupported data type for {}", zipEntry);
代码示例来源:origin: org.dihedron.commons/dihedron-commons
/**
* Adds a file to a ZIP archive.
*
* @param zipEntry
* the name of entry in the archive; if null, the name of the original
* file is used.
* @param file
* File object representing the file to be added to the archive.
*/
public void addFile(String zipEntry, File file) throws IOException {
String zipEntryName = Strings.isValid(zipEntry) ? zipEntry : file.getName();
logger.debug("adding '{}' as '{}'", file.getName(), zipEntryName);
try(InputStream input = new FileInputStream(file)) {
addFile(zipEntryName, input);
}
}
代码示例来源:origin: org.dihedron.commons/base
/**
* Adds a file to a ZIP archive.
*
* @param zipEntry
* the name of entry in the archive; if null, the name of the original
* file is used.
* @param file
* File object representing the file to be added to the archive.
*/
public void addFile(String zipEntry, File file) throws IOException {
String zipEntryName;
if(zipEntry == null || zipEntry.trim().length() == 0) {
zipEntryName = file.getName();
} else {
zipEntryName = zipEntry;
}
logger.debug("adding " + file.getName() + " as " + zipEntryName);
long size = file.length();
byte[] data = new byte[(int)size];
FileInputStream fis = new FileInputStream(file);
if(fis.read(data) != size) {
logger.error("error reading data into buffer");
}
fis.close();
addFile(zipEntryName, data);
}
代码示例来源:origin: org.dihedron.commons/dihedron-core
/**
* Adds a file to a ZIP archive.
*
* @param zipEntry
* the name of entry in the archive; if null, the name of the original
* file is used.
* @param file
* File object representing the file to be added to the archive.
*/
public void addFile(String zipEntry, File file) throws IOException {
String zipEntryName;
if(zipEntry == null || zipEntry.trim().length() == 0) {
zipEntryName = file.getName();
} else {
zipEntryName = zipEntry;
}
logger.debug("adding " + file.getName() + " as " + zipEntryName);
long size = file.length();
byte[] data = new byte[(int)size];
FileInputStream fis = new FileInputStream(file);
if(fis.read(data) != size) {
logger.error("error reading data into buffer");
}
fis.close();
addFile(zipEntryName, data);
}
我在多个页面上使用 Coldfusion Grid 程序时遇到问题,网格无法显示。最初我们得到一个“'EXT' 是未定义的错误”,但是在更新我们的脚本文件时我们现在得到一个“对象不支持属性或方法'Ad
因此,当我单击 addFiles 按钮时,我在 firebug 中收到一个错误,内容为 "TypeError: addFiles is not a function." 这对我来说没有任何意义,因为如
我正在使用 RestSharp 的 AddFile,它工作得很好,除了我的文件由于添加的这个头信息而最终被破坏。 -------------------------------289477580292
我尝试在集群上运行 sc.texfile("file:///.../myLocalFile.txt"),但出现了 java.io.FileNotFoundException在 worker 身上。 所
我想通过 Windows Azure 上托管的 Web 服务从我的 Windows Phone 发送图片。为了与我的服务进行通信,我使用 RESTSharp,并且我看到有一个名为 addFile 的方
我正在使用 RestSharp(Visual Studio 2013 中的版本 105.2.3.0,.net 4.5)来调用 NodeJS 托管的 Web 服务。我需要调用的电话之一是上传文件。使用
我一直在成功地将 pyspark 与我的 YARN 集群一起使用。我的工作 这样做涉及使用 RDD 的管道命令通过二进制发送数据 我做了。我可以像这样在 pyspark 中轻松做到这一点(假设 'sc
我正在使用 dropzone 将图像上传到画廊。我正在通过按钮提交。是否可以防止两次添加相同的文件?我不太确定是检查名称还是名称和大小。这是我的代码: var i = 0;
很明显,为了更好地分发小型查找数据,使用广播变量。 假设我们在yarn客户端模式下从主节点运行pySpark代码(spark提交)。因此应用程序驱动程序将始终在主节点上创建。我们从主节点上的本地路径读
我想了解 hadoop 是如何工作的。假设我在 hdfs 上有 10 个目录,它包含 100 个我想用 spark 处理的文件。 在书中 - 使用 Spark 进行快速数据处理 这要求文件在集群中的所
我正在尝试使用 sc.addFile 将文件添加到所有工作节点。但是,我发现它无法覆盖同一个文件。有什么方法可以通过 sc.addFile 覆盖文件吗? 最佳答案 配置为spark.files.ove
我正在尝试使用 sc.addFile 将文件添加到所有工作节点。但是,我发现它无法覆盖同一个文件。有什么方法可以通过 sc.addFile 覆盖文件吗? 最佳答案 配置为spark.files.ove
我在核心模式下使用 FineUploader(它工作得非常好——我怎么推荐都不为过)。 当我从代码中的其他地方调用 addFiles(file) 时,我想在 uploader 中找出分配给该文件的 I
我在这方面已经有一段时间了。这实际上工作了一次,然后就再也没有了。它根本不会创建 zip 文件。该文件确实存在。 $zip = new ZipArchive(); $filename = "./tes
本文整理了Java中net.lingala.zip4j.core.ZipFile.addFile()方法的一些代码示例,展示了ZipFile.addFile()的具体用法。这些代码示例主要来源于Git
本文整理了Java中net.lingala.zip4j.core.ZipFile.addFiles()方法的一些代码示例,展示了ZipFile.addFiles()的具体用法。这些代码示例主要来源于G
本文整理了Java中cn.hutool.core.util.ZipUtil.addFile()方法的一些代码示例,展示了ZipUtil.addFile()的具体用法。这些代码示例主要来源于Github
本文整理了Java中org.dihedron.core.zip.ZipArchive.addFile()方法的一些代码示例,展示了ZipArchive.addFile()的具体用法。这些代码示例主要来
perl Digest模块为 add 计算不同的 SHA1 摘要和 addfile职能。 我使用 /dev/urandom 创建了二进制随机数据 在 ubuntu 上运行 $ lsb_release
本文整理了Java中org.codehaus.plexus.archiver.zip.ZipArchiver.addFile()方法的一些代码示例,展示了ZipArchiver.addFile()的具
我是一名优秀的程序员,十分优秀!