本文整理了Java中org.crsh.util.ZipIterator
类的一些代码示例,展示了ZipIterator
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipIterator
类的具体详情如下:
包路径:org.crsh.util.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());
内容来源于网络,如有侵权,请联系作者删除!