本文整理了Java中org.reflections.vfs.Vfs.getFile()
方法的一些代码示例,展示了Vfs.getFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vfs.getFile()
方法的具体详情如下:
包路径:org.reflections.vfs.Vfs
类名称:Vfs
方法名:getFile
[英]try to get java.io.File from url
[中]尝试获取java。伊奥。来自url的文件
代码示例来源:origin: ronmamo/reflections
public boolean matches(URL url) {
if (url.getProtocol().equals("file") && !hasJarFileInPath(url)) {
java.io.File file = getFile(url);
return file != null && file.isDirectory();
} else return false;
}
代码示例来源:origin: org.reflections/reflections
public boolean matches(URL url) {
if (url.getProtocol().equals("file") && !hasJarFileInPath(url)) {
java.io.File file = getFile(url);
return file != null && file.isDirectory();
} else return false;
}
代码示例来源:origin: ronmamo/reflections
public Dir createDir(final URL url) throws Exception {
return new ZipDir(new JarFile(getFile(url)));
}
},
代码示例来源:origin: ronmamo/reflections
public Dir createDir(final URL url) throws Exception {
return new SystemDir(getFile(url));
}
},
代码示例来源:origin: org.reflections/reflections
public Dir createDir(final URL url) throws Exception {
return new ZipDir(new JarFile(getFile(url)));
}
},
代码示例来源:origin: org.reflections/reflections
public Dir createDir(final URL url) throws Exception {
return new SystemDir(getFile(url));
}
},
代码示例来源:origin: ronmamo/reflections
public Dir createDir(URL url) throws Exception {
try {
URLConnection urlConnection = url.openConnection();
if (urlConnection instanceof JarURLConnection) {
urlConnection.setUseCaches(false);
return new ZipDir(((JarURLConnection) urlConnection).getJarFile());
}
} catch (Throwable e) { /*fallback*/ }
java.io.File file = getFile(url);
if (file != null) {
return new ZipDir(new JarFile(file));
}
return null;
}
},
代码示例来源:origin: org.reflections/reflections
public Dir createDir(URL url) throws Exception {
try {
URLConnection urlConnection = url.openConnection();
if (urlConnection instanceof JarURLConnection) {
return new ZipDir(((JarURLConnection) urlConnection).getJarFile());
}
} catch (Throwable e) { /*fallback*/ }
java.io.File file = getFile(url);
if (file != null) {
return new ZipDir(new JarFile(file));
}
return null;
}
},
代码示例来源:origin: thinkaurelius/titan
File f;
try {
f = Vfs.getFile(u);
} catch (Throwable t) {
log.debug("Error invoking Vfs.getFile on URL {}", u, t);
代码示例来源:origin: JanusGraph/janusgraph
File f;
try {
f = Vfs.getFile(u);
} catch (Throwable t) {
log.debug("Error invoking Vfs.getFile on URL {}", u, t);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.reflections
public boolean matches(URL url) {
if (url.getProtocol().equals("file") && !hasJarFileInPath(url)) {
java.io.File file = getFile(url);
return file != null && file.isDirectory();
} else return false;
}
代码示例来源:origin: org.rapidpm/rapidpm-dependencies-core-reflections
public boolean matches(URL url) {
return url.getProtocol().equals("file") && ! hasJarFileInPath(url) &&
getFile(url).isDirectory();
}
代码示例来源:origin: ai.h2o/reflections
public boolean matches(URL url) {
return url.getProtocol().equals("file") && !url.toExternalForm().contains(".jar") &&
getFile(url).isDirectory();
}
代码示例来源:origin: ai.h2o/reflections
public Dir createDir(final URL url) throws Exception {
return new SystemDir(getFile(url));
}
},
代码示例来源:origin: com.thoughtworks.gauge/gauge-java
@Override
public Vfs.Dir createDir(URL url) throws Exception {
File file = Vfs.getFile(url);
return file.isDirectory() ? new SystemDir(file) : new ZipDir(new JarFile(Vfs.getFile(url)));
}
});
代码示例来源:origin: getgauge/gauge-java
@Override
public Vfs.Dir createDir(URL url) throws Exception {
File file = Vfs.getFile(url);
return file.isDirectory() ? new SystemDir(file) : new ZipDir(new JarFile(Vfs.getFile(url)));
}
});
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.reflections
public Dir createDir(final URL url) throws Exception {
return new SystemDir(getFile(url));
}
},
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.reflections
public Dir createDir(final URL url) throws Exception {
return new ZipDir(new JarFile(getFile(url)));
}
},
代码示例来源:origin: org.rapidpm/rapidpm-dependencies-core-reflections
public Dir createDir(final URL url) throws Exception {
return new SystemDir(getFile(url));
}
},
代码示例来源:origin: ai.h2o/reflections
public Dir createDir(final URL url) throws Exception {
return new ZipDir(new JarFile(getFile(url)));
}
},
内容来源于网络,如有侵权,请联系作者删除!