gpt4 book ai didi

org.crsh.util.ZipIterator类的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 23:45:31 26 4
gpt4 key购买 nike

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

ZipIterator介绍

暂无

代码示例

代码示例来源:origin: crashub/crash

public static ZipIterator create(URL url) throws IOException, URISyntaxException {
 if (url.getProtocol().equals("file")) {
  return create(Utils.toFile(url));
 } else if (url.getProtocol().equals("jar")) {
  int pos = url.getPath().lastIndexOf("!/");
  URL jarURL = new URL(url.getPath().substring(0, pos));
  String path = url.getPath().substring(pos + 2);
  final ZipIterator container = create(jarURL);
  ZipIterator zip = null;
  try {
   while (container.hasNext()) {
    ZipEntry entry = container.next();
    if (entry.getName().equals(path)) {
     InputStreamFactory resolved = container.getStreamFactory();
     final InputStream nested = resolved.open();
     InputStream filter = new InputStream() {
     zip = create(filter);
     break;
  return create(url.openStream());

代码示例来源:origin: stackoverflow.com

public static void main (String[] args)
{
  List<Integer> lst1 = new List<>();
  List<String> lst2 = new List<>();
  lst1.prepend(3);
  lst1.prepend(2);
  lst1.prepend(1);
  lst2.prepend("three");
  lst2.prepend("two");
  lst2.prepend("one");
  Iterator<Integer> it1 = lst1.getIterator();
  Iterator<String> it2 = lst2.getIterator();
  ZipIterator zit = zip(it1, it2);
  while (zit.hasNext())
  {
    System.out.println(zit.next());
  }
}

代码示例来源:origin: crashub/crash

URL jarURL = new URL(url.getPath().substring(0, pos));
String path = url.getPath().substring(pos + 2);
ZipIterator i = ZipIterator.create(jarURL);
try {
 while (i.hasNext()) {
  ZipEntry entry = i.next();
  if (entry.getName().startsWith(path)) {
   addEntry(url, entry.getName().substring(path.length()), i.getStreamFactory());

代码示例来源:origin: com.github.corda.crash/crash.shell

public static ZipIterator create(URL url) throws IOException, URISyntaxException {
 if (url.getProtocol().equals("file")) {
  return create(Utils.toFile(url));
 } else if (url.getProtocol().equals("jar")) {
  int pos = url.getPath().lastIndexOf("!/");
  URL jarURL = new URL(url.getPath().substring(0, pos));
  String path = url.getPath().substring(pos + 2);
  final ZipIterator container = create(jarURL);
  ZipIterator zip = null;
  try {
   while (container.hasNext()) {
    ZipEntry entry = container.next();
    if (entry.getName().equals(path)) {
     InputStreamFactory resolved = container.getStreamFactory();
     final InputStream nested = resolved.open();
     InputStream filter = new InputStream() {
     zip = create(filter);
     break;
  return create(url.openStream());

代码示例来源:origin: org.crashub/crash.shell

public static ZipIterator create(URL url) throws IOException, URISyntaxException {
 if (url.getProtocol().equals("file")) {
  return create(Utils.toFile(url));
 } else if (url.getProtocol().equals("jar")) {
  int pos = url.getPath().lastIndexOf("!/");
  URL jarURL = new URL(url.getPath().substring(0, pos));
  String path = url.getPath().substring(pos + 2);
  final ZipIterator container = create(jarURL);
  ZipIterator zip = null;
  try {
   while (container.hasNext()) {
    ZipEntry entry = container.next();
    if (entry.getName().equals(path)) {
     InputStreamFactory resolved = container.getStreamFactory();
     final InputStream nested = resolved.open();
     InputStream filter = new InputStream() {
     zip = create(filter);
     break;
  return create(url.openStream());

代码示例来源:origin: org.crashub/crash.shell

URL jarURL = new URL(url.getPath().substring(0, pos));
String path = url.getPath().substring(pos + 2);
ZipIterator i = ZipIterator.create(jarURL);
try {
 while (i.hasNext()) {
  ZipEntry entry = i.next();
  if (entry.getName().startsWith(path)) {
   addEntry(url, entry.getName().substring(path.length()), i.getStreamFactory());

代码示例来源:origin: com.github.corda.crash/crash.shell

URL jarURL = new URL(url.getPath().substring(0, pos));
String path = url.getPath().substring(pos + 2);
ZipIterator i = ZipIterator.create(jarURL);
try {
 while (i.hasNext()) {
  ZipEntry entry = i.next();
  if (entry.getName().startsWith(path)) {
   addEntry(url, entry.getName().substring(path.length()), i.getStreamFactory());

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