gpt4 book ai didi

org.seasar.kvasir.util.io.impl.ZipReaderResource.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 21:08:31 29 4
gpt4 key购买 nike

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

ZipReaderResource.<init>介绍

暂无

代码示例

代码示例来源:origin: org.seasar.kvasir/kvasir-util

public Resource getParentResource()
{
  if (path_.length() == 0) {
    return null;
  } else {
    int slash = path_.lastIndexOf('/');
    if (slash >= 0) {
      return new ZipReaderResource(file_,
        path_.substring(0, slash), entryMap_);
    } else {
      return new ZipReaderResource(file_, "", entryMap_);
    }
  }
}

代码示例来源:origin: org.seasar.kvasir/kvasir-util

public Resource getChildResource(String child)
{
  if (child.startsWith("/")) {
    child = child.substring(1);
  }
  if (child.endsWith("/")) {
    child = child.substring(0, child.length() - 1);
  }
  return new ZipReaderResource(file_, spath_ + child, entryMap_);
}

代码示例来源:origin: org.seasar.kvasir/kvasir-system

private void extractPluginArtifactTo(final Artifact artifact,
  final Resource pluginsDir)
  throws ZipException, IOException
{
  final File file = artifact.getFile();
  final ZipFile zipFile = new ZipFile(file);
  try {
    final ZipReaderResource zipReaderResource = new ZipReaderResource(
      zipFile);
    ResourceUtils.copy(zipReaderResource, pluginsDir);
  } finally {
    zipFile.close();
  }
}

代码示例来源:origin: org.seasar.kvasir/kvasir-util

public Resource[] listResources()
{
  if (!exists_ || !directory_) {
    return null;
  }
  Map map = getDescendantEntryMap();
  List list = new ArrayList();
  int pathOffset = (path_.length() == 0) ? 0 : path_.length() + 1;
  for (Iterator itr = map.keySet().iterator(); itr.hasNext();) {
    String path = (String)itr.next();
    if (path.endsWith("/")) {
      path = path.substring(0, path.length() - 1);
    }
    String subPath = path.substring(pathOffset);
    if (subPath.indexOf('/') < 0) {
      list.add(new ZipReaderResource(file_, path, entryMap_));
    }
  }
  return (Resource[])list.toArray(new Resource[0]);
}

代码示例来源:origin: org.seasar.kvasir.cms.manage/org.seasar.kvasir.cms.manage

zipFile = new ZipFile(tempFile);
  pagePlugin_.imports(getPage(), name_.trim(),
    new ZipReaderResource(zipFile));
  return true;
} catch (IOException ex) {

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