- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.setCreateUnicodeExtraFields()
方法的一些代码示例,展示了ZipArchiveOutputStream.setCreateUnicodeExtraFields()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipArchiveOutputStream.setCreateUnicodeExtraFields()
方法的具体详情如下:
包路径:org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream
类名称:ZipArchiveOutputStream
方法名:setCreateUnicodeExtraFields
[英]Whether to create Unicode Extra Fields.
Defaults to NEVER.
[中]是否创建Unicode额外字段。
默认为从不。
代码示例来源:origin: stackoverflow.com
ZipArchiveOutputStream ostream = ...; // Your initialization code here
ostream.setEncoding("Cp437"); // This should handle your "special" characters
ostream.setFallbackToUTF8(true); // For "unknown" characters!
ostream.setUseLanguageEncodingFlag(true);
ostream.setCreateUnicodeExtraFields(
ZipArchiveOutputStream.UnicodeExtraFieldPolicy.NOT_ENCODEABLE);
代码示例来源:origin: org.codehaus.plexus/plexus-archiver
new ZipArchiveOutputStream( bufferedOutputStream( fileOutputStream( zipFile, "zip" ) ) );
zipArchiveOutputStream.setEncoding( encoding );
zipArchiveOutputStream.setCreateUnicodeExtraFields( this.getUnicodeExtraFieldPolicy() );
zipArchiveOutputStream.setMethod(
doCompress ? ZipArchiveOutputStream.DEFLATED : ZipArchiveOutputStream.STORED );
代码示例来源:origin: wso2-attic/esb-connectors
fos));
zaos.setEncoding("UTF-8");
zaos.setCreateUnicodeExtraFields(ZipArchiveOutputStream.UnicodeExtraFieldPolicy.ALWAYS);
代码示例来源:origin: org.alfresco/alfresco-repository
@Override
public void start(final ExporterContext context)
{
zipStream = new ZipArchiveOutputStream(outputStream);
// NOTE: This encoding allows us to workaround bug...
// http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_id=4820807
zipStream.setEncoding("UTF-8");
zipStream.setCreateUnicodeExtraFields(UnicodeExtraFieldPolicy.ALWAYS);
zipStream.setUseLanguageEncodingFlag(true);
zipStream.setFallbackToUTF8(true);
}
代码示例来源:origin: Alfresco/alfresco-repository
@Override
public void start(final ExporterContext context)
{
zipStream = new ZipArchiveOutputStream(outputStream);
// NOTE: This encoding allows us to workaround bug...
// http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_id=4820807
zipStream.setEncoding("UTF-8");
zipStream.setCreateUnicodeExtraFields(UnicodeExtraFieldPolicy.ALWAYS);
zipStream.setUseLanguageEncodingFlag(true);
zipStream.setFallbackToUTF8(true);
}
代码示例来源:origin: Alfresco/alfresco-repository
public void startExport()
{
// ALF-2016
zipStream = new ZipArchiveOutputStream(outputStream);
// NOTE: This encoding allows us to workaround bug...
// http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_id=4820807
zipStream.setEncoding("UTF-8");
zipStream.setCreateUnicodeExtraFields(UnicodeExtraFieldPolicy.ALWAYS);
zipStream.setUseLanguageEncodingFlag(true);
zipStream.setFallbackToUTF8(true);
zipStream.setUseZip64(Zip64Mode.Always);
}
代码示例来源:origin: org.alfresco/alfresco-repository
public void startExport()
{
// ALF-2016
zipStream = new ZipArchiveOutputStream(outputStream);
// NOTE: This encoding allows us to workaround bug...
// http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_id=4820807
zipStream.setEncoding("UTF-8");
zipStream.setCreateUnicodeExtraFields(UnicodeExtraFieldPolicy.ALWAYS);
zipStream.setUseLanguageEncodingFlag(true);
zipStream.setFallbackToUTF8(true);
zipStream.setUseZip64(Zip64Mode.Always);
}
代码示例来源:origin: org.apache.ant/ant-compress
private void configure(ZipArchiveOutputStream o) {
o.setLevel(level);
o.setComment(comment);
o.setFallbackToUTF8(fallBackToUTF8);
o.setUseLanguageEncodingFlag(useLanguageEncodingFlag);
o.setCreateUnicodeExtraFields(createUnicodeExtraFields.getPolicy());
o.setUseZip64(zip64Mode.getPolicy());
}
代码示例来源:origin: stackoverflow.com
import java.io.*;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
public class ZipFiles {
public static void main(String[] args) throws Exception{
ZipArchiveOutputStream zipOut = new ZipArchiveOutputStream(new FileOutputStream("测试.zip"));
zipOut.setEncoding("Cp437"); // This should handle your "special" characters
zipOut.setFallbackToUTF8(true); // For "unknown" characters!
zipOut.setUseLanguageEncodingFlag(true);
zipOut.setCreateUnicodeExtraFields(
ZipArchiveOutputStream.UnicodeExtraFieldPolicy.NOT_ENCODEABLE);
zipOut.putArchiveEntry(new ZipArchiveEntry("测试.xml"));
zipOut.putArchiveEntry(new ZipArchiveEntry("test.xml"));
zipOut.closeArchiveEntry();
zipOut.flush();
zipOut.close();
}
}
代码示例来源:origin: osmlab/atlas
zout.setCreateUnicodeExtraFields(
ZipArchiveOutputStream.UnicodeExtraFieldPolicy.NOT_ENCODEABLE);
return new Archiver(zout);
代码示例来源:origin: org.xwiki.platform/xwiki-platform-filter-stream-xar
this.zipStream.setCreateUnicodeExtraFields(ZipArchiveOutputStream.UnicodeExtraFieldPolicy.ALWAYS);
本文整理了Java中org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.setCreateUnicodeExtraFiel
我是一名优秀的程序员,十分优秀!