gpt4 book ai didi

de.idyl.winzipaes.impl.ZipFileEntryInputStream.read()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 10:43:27 25 4
gpt4 key购买 nike

本文整理了Java中de.idyl.winzipaes.impl.ZipFileEntryInputStream.read()方法的一些代码示例,展示了ZipFileEntryInputStream.read()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipFileEntryInputStream.read()方法的具体详情如下:
包路径:de.idyl.winzipaes.impl.ZipFileEntryInputStream
类名称:ZipFileEntryInputStream
方法名:read

ZipFileEntryInputStream.read介绍

暂无

代码示例

代码示例来源:origin: de.idyl/winzipaes

public int read( byte[] b ) throws IOException {
  return this.read(b, 0, b.length);
}

代码示例来源:origin: redfish64/TinyTravelTracker

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);
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com