gpt4 book ai didi

java.util.zip.ZipFile.checkNotClosed()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 01:22:40 26 4
gpt4 key购买 nike

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

ZipFile.checkNotClosed介绍

暂无

代码示例

代码示例来源:origin: robovm/robovm

/**
 * Returns this file's comment, or null if it doesn't have one.
 * See {@link ZipOutputStream#setComment}.
 *
 * @throws IllegalStateException if this zip file has been closed.
 * @since 1.7
 */
public String getComment() {
  checkNotClosed();
  return comment;
}

代码示例来源:origin: robovm/robovm

/**
 * Returns the number of {@code ZipEntries} in this {@code ZipFile}.
 *
 * @return the number of entries in this file.
 * @throws IllegalStateException if this zip file has been closed.
 */
public int size() {
  checkNotClosed();
  return entries.size();
}

代码示例来源:origin: robovm/robovm

/**
 * Returns the zip entry with the given name, or null if there is no such entry.
 *
 * @throws IllegalStateException if this zip file has been closed.
 */
public ZipEntry getEntry(String entryName) {
  checkNotClosed();
  if (entryName == null) {
    throw new NullPointerException("entryName == null");
  }
  ZipEntry ze = entries.get(entryName);
  if (ze == null) {
    ze = entries.get(entryName + "/");
  }
  return ze;
}

代码示例来源:origin: robovm/robovm

/**
 * Returns an enumeration of the entries. The entries are listed in the
 * order in which they appear in the zip file.
 *
 * <p>If you only need to iterate over the entries in a zip file, and don't
 * need random-access entry lookup by name, you should probably use {@link ZipInputStream}
 * instead, to avoid paying to construct the in-memory index.
 *
 * @throws IllegalStateException if this zip file has been closed.
 */
public Enumeration<? extends ZipEntry> entries() {
  checkNotClosed();
  final Iterator<ZipEntry> iterator = entries.values().iterator();
  return new Enumeration<ZipEntry>() {
    public boolean hasMoreElements() {
      checkNotClosed();
      return iterator.hasNext();
    }
    public ZipEntry nextElement() {
      checkNotClosed();
      return iterator.next();
    }
  };
}

代码示例来源:origin: MobiVM/robovm

/**
 * Returns this file's comment, or null if it doesn't have one.
 * See {@link ZipOutputStream#setComment}.
 *
 * @throws IllegalStateException if this zip file has been closed.
 * @since 1.7
 */
public String getComment() {
  checkNotClosed();
  return comment;
}

代码示例来源:origin: ibinti/bugvm

/**
 * Returns this file's comment, or null if it doesn't have one.
 * See {@link ZipOutputStream#setComment}.
 *
 * @throws IllegalStateException if this zip file has been closed.
 * @since 1.7
 */
public String getComment() {
  checkNotClosed();
  return comment;
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns this file's comment, or null if it doesn't have one.
 * See {@link ZipOutputStream#setComment}.
 *
 * @throws IllegalStateException if this zip file has been closed.
 * @since 1.7
 */
public String getComment() {
  checkNotClosed();
  return comment;
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Returns this file's comment, or null if it doesn't have one.
 * See {@link ZipOutputStream#setComment}.
 *
 * @throws IllegalStateException if this zip file has been closed.
 * @since 1.7
 */
public String getComment() {
  checkNotClosed();
  return comment;
}

代码示例来源:origin: com.jtransc/jtransc-rt

/**
 * Returns this file's comment, or null if it doesn't have one.
 * See {@link ZipOutputStream#setComment}.
 *
 * @throws IllegalStateException if this zip file has been closed.
 * @since 1.7
 */
public String getComment() {
  checkNotClosed();
  return comment;
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Returns this file's comment, or null if it doesn't have one.
 * See {@link ZipOutputStream#setComment}.
 *
 * @throws IllegalStateException if this zip file has been closed.
 * @since 1.7
 */
public String getComment() {
  checkNotClosed();
  return comment;
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Returns this file's comment, or null if it doesn't have one.
 * See {@link ZipOutputStream#setComment}.
 *
 * @throws IllegalStateException if this zip file has been closed.
 * @since 1.7
 */
public String getComment() {
  checkNotClosed();
  return comment;
}

代码示例来源:origin: ibinti/bugvm

/**
 * Returns the number of {@code ZipEntries} in this {@code ZipFile}.
 *
 * @return the number of entries in this file.
 * @throws IllegalStateException if this zip file has been closed.
 */
public int size() {
  checkNotClosed();
  return entries.size();
}

代码示例来源:origin: MobiVM/robovm

/**
 * Returns the number of {@code ZipEntries} in this {@code ZipFile}.
 *
 * @return the number of entries in this file.
 * @throws IllegalStateException if this zip file has been closed.
 */
public int size() {
  checkNotClosed();
  return entries.size();
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns the number of {@code ZipEntries} in this {@code ZipFile}.
 *
 * @return the number of entries in this file.
 * @throws IllegalStateException if this zip file has been closed.
 */
public int size() {
  checkNotClosed();
  return entries.size();
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Returns the number of {@code ZipEntries} in this {@code ZipFile}.
 *
 * @return the number of entries in this file.
 * @throws IllegalStateException if this zip file has been closed.
 */
public int size() {
  checkNotClosed();
  return entries.size();
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Returns the number of {@code ZipEntries} in this {@code ZipFile}.
 *
 * @return the number of entries in this file.
 * @throws IllegalStateException if this zip file has been closed.
 */
public int size() {
  checkNotClosed();
  return entries.size();
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Returns the number of {@code ZipEntries} in this {@code ZipFile}.
 *
 * @return the number of entries in this file.
 * @throws IllegalStateException if this zip file has been closed.
 */
public int size() {
  checkNotClosed();
  return entries.size();
}

代码示例来源:origin: com.jtransc/jtransc-rt

/**
 * Returns the number of {@code ZipEntries} in this {@code ZipFile}.
 *
 * @return the number of entries in this file.
 * @throws IllegalStateException if this zip file has been closed.
 */
public int size() {
  checkNotClosed();
  return entries.size();
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Returns the zip entry with the given name, or null if there is no such entry.
 *
 * @throws IllegalStateException if this zip file has been closed.
 */
public ZipEntry getEntry(String entryName) {
  checkNotClosed();
  if (entryName == null) {
    throw new NullPointerException("entryName == null");
  }
  ZipEntry ze = entries.get(entryName);
  if (ze == null) {
    ze = entries.get(entryName + "/");
  }
  return ze;
}

代码示例来源:origin: MobiVM/robovm

/**
 * Returns the zip entry with the given name, or null if there is no such entry.
 *
 * @throws IllegalStateException if this zip file has been closed.
 */
public ZipEntry getEntry(String entryName) {
  checkNotClosed();
  if (entryName == null) {
    throw new NullPointerException("entryName == null");
  }
  ZipEntry ze = entries.get(entryName);
  if (ze == null) {
    ze = entries.get(entryName + "/");
  }
  return ze;
}

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