本文整理了Java中aQute.lib.osgi.Jar.getDirectory()
方法的一些代码示例,展示了Jar.getDirectory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jar.getDirectory()
方法的具体详情如下:
包路径:aQute.lib.osgi.Jar
类名称:Jar
方法名:getDirectory
暂无
代码示例来源:origin: biz.aQute/bnd
public Resource remove(String path) {
Resource resource = resources.remove(path);
String dir = getDirectory(path);
Map<String, Resource> mdir = directories.get(dir);
// must be != null
mdir.remove(path);
return resource;
}
代码示例来源:origin: biz.aQute/aQute.bnd
public Resource remove(String path) {
Resource resource = resources.remove(path);
String dir = getDirectory(path);
Map<String, Resource> mdir = directories.get(dir);
// must be != null
mdir.remove(path);
return resource;
}
代码示例来源:origin: biz.aQute/aQute.bnd
public boolean putResource(String path, Resource resource, boolean overwrite) {
updateModified(resource.lastModified(), path);
if (path.equals("META-INF/MANIFEST.MF")) {
manifest = null;
if (resources.isEmpty())
manifestFirst = true;
}
String dir = getDirectory(path);
Map<String, Resource> s = directories.get(dir);
if (s == null) {
s = new TreeMap<String, Resource>();
directories.put(dir, s);
int n = dir.lastIndexOf('/');
while (n > 0) {
String dd = dir.substring(0, n);
if (directories.containsKey(dd))
break;
directories.put(dd, null);
n = dd.lastIndexOf('/');
}
}
boolean duplicate = s.containsKey(path);
if (!duplicate || overwrite) {
resources.put(path, resource);
s.put(path, resource);
}
return duplicate;
}
代码示例来源:origin: biz.aQute/bnd
public boolean putResource(String path, Resource resource, boolean overwrite) {
updateModified(resource.lastModified(), path);
while (path.startsWith("/"))
path = path.substring(1);
if (path.equals("META-INF/MANIFEST.MF")) {
manifest = null;
if (resources.isEmpty())
manifestFirst = true;
}
String dir = getDirectory(path);
Map<String, Resource> s = directories.get(dir);
if (s == null) {
s = new TreeMap<String, Resource>();
directories.put(dir, s);
int n = dir.lastIndexOf('/');
while (n > 0) {
String dd = dir.substring(0, n);
if (directories.containsKey(dd))
break;
directories.put(dd, null);
n = dd.lastIndexOf('/');
}
}
boolean duplicate = s.containsKey(path);
if (!duplicate || overwrite) {
resources.put(path, resource);
s.put(path, resource);
}
return duplicate;
}
内容来源于网络,如有侵权,请联系作者删除!