- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中de.idyl.winzipaes.impl.ZipFileEntryInputStream
类的一些代码示例,展示了ZipFileEntryInputStream
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipFileEntryInputStream
类的具体详情如下:
包路径:de.idyl.winzipaes.impl.ZipFileEntryInputStream
类名称:ZipFileEntryInputStream
[英]Provide InputStream access to compressed data from one ZipEntry contained within one ZipFile. Necessary as java.util.zip.ZipInputStream only provides access to the uncompressed data.
[中]提供从一个ZipFile中包含的一个ZipPentry对压缩数据的InputStream访问。就像java一样必要。util。拉链ZipInputStream只提供对未压缩数据的访问。
代码示例来源:origin: redfish64/TinyTravelTracker
protected void add(ZipFile inFile, String password) throws IOException,
UnsupportedEncodingException {
ZipFileEntryInputStream zfe = new ZipFileEntryInputStream(inFile.getName());
try {
Enumeration<? extends ZipEntry> en = inFile.entries();
while (en.hasMoreElements()) {
ZipEntry ze = en.nextElement();
zfe.nextEntry(ze);
add(ze, zfe, password);
}
} finally {
zfe.close();
}
}
代码示例来源:origin: redfish64/TinyTravelTracker
public int read( byte[] b ) throws IOException {
return this.read(b, 0, b.length);
}
代码示例来源:origin: de.idyl/winzipaes
protected void add(ZipFile inFile, String password) throws IOException,
UnsupportedEncodingException {
ZipFileEntryInputStream zfe = new ZipFileEntryInputStream(inFile.getName());
try {
Enumeration<? extends ZipEntry> en = inFile.entries();
while (en.hasMoreElements()) {
ZipEntry ze = en.nextElement();
zfe.nextEntry(ze);
add(ze, zfe, password);
}
} finally {
zfe.close();
}
}
代码示例来源:origin: de.idyl/winzipaes
public int read( byte[] b ) throws IOException {
return this.read(b, 0, b.length);
}
代码示例来源:origin: redfish64/TinyTravelTracker
protected void add(ZipEntry zipEntry, ZipFileEntryInputStream zipData, String password)
throws IOException, UnsupportedEncodingException {
encrypter.init(password, 256);
ExtZipEntry entry = new ExtZipEntry(zipEntry.getName());
entry.setMethod(zipEntry.getMethod());
entry.setSize(zipEntry.getSize());
entry.setCompressedSize(zipEntry.getCompressedSize() + 28);
entry.setTime(zipEntry.getTime());
entry.initEncryptedEntry();
zipOS.putNextEntry(entry);
// ZIP-file data contains: 1. salt 2. pwVerification 3. encryptedContent 4. authenticationCode
zipOS.writeBytes(encrypter.getSalt());
zipOS.writeBytes(encrypter.getPwVerification());
byte[] data = new byte[1024];
int read = zipData.read(data);
while (read != -1) {
encrypter.encrypt(data, read);
zipOS.writeBytes(data, 0, read);
read = zipData.read(data);
}
byte[] finalAuthentication = encrypter.getFinalAuthentication();
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("finalAuthentication=" + Arrays.toString(finalAuthentication) + " at pos="
+ zipOS.getWritten());
}
zipOS.writeBytes(finalAuthentication);
}
代码示例来源:origin: de.idyl/winzipaes
protected void add(ZipEntry zipEntry, ZipFileEntryInputStream zipData, String password)
throws IOException, UnsupportedEncodingException {
encrypter.init(password, 256);
ExtZipEntry entry = new ExtZipEntry(zipEntry.getName());
entry.setMethod(zipEntry.getMethod());
entry.setSize(zipEntry.getSize());
entry.setCompressedSize(zipEntry.getCompressedSize() + 28);
entry.setTime(zipEntry.getTime());
entry.initEncryptedEntry();
zipOS.putNextEntry(entry);
// ZIP-file data contains: 1. salt 2. pwVerification 3. encryptedContent 4. authenticationCode
zipOS.writeBytes(encrypter.getSalt());
zipOS.writeBytes(encrypter.getPwVerification());
byte[] data = new byte[1024];
int read = zipData.read(data);
while (read != -1) {
encrypter.encrypt(data, read);
zipOS.writeBytes(data, 0, read);
read = zipData.read(data);
}
byte[] finalAuthentication = encrypter.getFinalAuthentication();
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("finalAuthentication=" + Arrays.toString(finalAuthentication) + " at pos="
+ zipOS.getWritten());
}
zipOS.writeBytes(finalAuthentication);
}
本文整理了Java中de.idyl.winzipaes.impl.ZipFileEntryInputStream.close()方法的一些代码示例,展示了ZipFileEntryInputStream
本文整理了Java中de.idyl.winzipaes.impl.ZipFileEntryInputStream.read()方法的一些代码示例,展示了ZipFileEntryInputStream.
我是一名优秀的程序员,十分优秀!