net.oneandone.sushi.fs.zip.ZipNode类的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(73)

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

ZipNode介绍

[英]Represents an entry in a zip or jar file. Read-only
[中]表示zip或jar文件中的条目。只读

代码示例

代码示例来源:origin: net.oneandone/sushi

public ZipNode node(String path, String encodedQuery) {
  if (encodedQuery != null) {
    throw new IllegalArgumentException(encodedQuery);
  }
  return new ZipNode(this, path);
}

代码示例来源:origin: net.oneandone/sushi

public void copyFileFrom(InputStream dest) throws FileNotFoundException, CopyFileFromException {
  copyFileFromImpl(dest);
}

代码示例来源:origin: net.oneandone/sushi

public long copyFileTo(OutputStream dest, long skip) throws CopyFileToException, FileNotFoundException {
  return copyFileToImpl(dest, skip);
}

代码示例来源:origin: net.oneandone/sushi

@Override
public GroupPrincipal getGroup() {
  throw unsupported("getGroup()");
}

代码示例来源:origin: net.oneandone.stool/main

private void readPomInfo() throws IOException {
  Node pominfo;
  Properties properties;
  // TODO - pominfo plugin is not publically available
  pominfo = file.openZip().join("WEB-INF", "classes", "META-INF", "pominfo.properties");
  if (!pominfo.exists()) {
    throw new IOException("No pominfo.properties available. Parent Pom is too old. Please update.");
  }
  properties = pominfo.readProperties();
  if (properties.get("scmConnection") == null || properties.get("build.revision") == null) {
    throw new IOException("Parent Pom is too old to assemble Changes. Please update.");
  }
  version = properties.getProperty("version");
  revision = Long.parseLong(properties.getProperty("build.revision"));
}

代码示例来源:origin: net.oneandone/sushi

/**
 * @param dest resulting directory
 * @return dest
 */
public Node unzip(Node dest) throws IOException {
  openZip().copyDirectory(dest);
  return this;
}

代码示例来源:origin: net.oneandone/sushi

public Manifest readManifest() throws IOException {
    Manifest result;

    try (InputStream src = node(Archive.MANIFEST, null).newInputStream()) {
      result = new Manifest(src);
    }
    return result;
  }
}

代码示例来源:origin: net.oneandone/sushi

@Override
public boolean exists() {
  return root.getZip().getEntry(path) != null || isDirectory();
}

代码示例来源:origin: net.oneandone/sushi

@Override
public List<ZipNode> list() throws DirectoryNotFoundException, ListException {
  List<String> paths;
  List<ZipNode> result;
  try {
    if (isFile()) {
      return null;
    }
  } catch (ExistsException e) {
    throw new ListException(this, e);
  }
  paths = root.list(path);
  if (paths.size() == 0 && root.getZip().getEntry(path + "/") == null) {
    throw new DirectoryNotFoundException(this);
  }
  result = new ArrayList<>();
  for (String path : paths) {
    result.add(root.node(path, null));
  }
  return result;
}

代码示例来源:origin: net.oneandone/sushi

return root((FileNode) jar).node(ZipNode.decodePath(path), null);
} catch (IOException e) {
  throw new NodeInstantiationException(uri, "world exception", e);

代码示例来源:origin: net.oneandone/sushi

@Override
public void setGroup(GroupPrincipal group) {
  throw unsupported("setGroup()");
}

代码示例来源:origin: net.oneandone/sushi

add = moduleFile(uri.toURL()).openZip().join("classes", name);
} else {
  add = node(uri);

代码示例来源:origin: net.oneandone/sushi

public Node unjar(Node dest) throws IOException {
  openJar().copyDirectory(dest);
  return this;
}

代码示例来源:origin: net.oneandone/sushi

@Override
public String readLink() {
  throw unsupported("readLink()");
}

代码示例来源:origin: net.oneandone/sushi

@Override
public UserPrincipal getOwner() {
  throw unsupported("getOwner()");
}

代码示例来源:origin: net.oneandone/sushi

@Override
public String getPermissions() {
  throw unsupported("getPermissions()");
}

代码示例来源:origin: net.oneandone/sushi

@Override
public void setPermissions(String permissions) {
  throw unsupported("setPermissions()");
}

代码示例来源:origin: net.oneandone/sushi

@Override
public void setOwner(UserPrincipal owner) {
  throw unsupported("setOwner()");
}

代码示例来源:origin: net.oneandone/sushi

@Override
public OutputStream newOutputStream(boolean append) {
  throw unsupported("newOutputStream(" + append + ")");
}

代码示例来源:origin: net.oneandone/sushi

@Override
public void mklink(String target) {
  throw unsupported("mklink()");
}

相关文章