本文整理了Java中org.jgroups.util.Util.components()
方法的一些代码示例,展示了Util.components()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.components()
方法的具体详情如下:
包路径:org.jgroups.util.Util
类名称:Util
方法名:components
暂无
代码示例来源:origin: wildfly/wildfly
protected static String filename(String full_path) {
String[] comps=Util.components(full_path, File.separator);
return comps != null? comps[comps.length -1] : null;
}
代码示例来源:origin: wildfly/wildfly
protected static String trim(String str) {
if(str == null) return null;
str=str.trim();
if(str.equals(File.separator))
return str;
String[] comps=Util.components(str, File.separator);
return comps != null && comps.length > 0? comps[comps.length-1] : null;
}
代码示例来源:origin: wildfly/wildfly
/**
* Verifies whether child is a child (dir or file) of parent
* @param parent
* @param child
* @return True if child is a child, false otherwise
*/
protected static boolean isChildOf(String parent, String child) {
if(parent == null || child == null)
return false;
if(!child.startsWith(parent))
return false;
if(child.length() <= parent.length())
return false;
int from=parent.equals(File.separator)? parent.length() : parent.length() +1;
// if(from-1 > child.length())
// return false;
String[] comps=Util.components(child.substring(from), File.separator);
return comps != null && comps.length <= 1;
}
代码示例来源:origin: wildfly/wildfly
String[] comps=Util.components(grid_path, File.separator);
String filename=comps[comps.length - 1];
target_path=target_path + (target_path.endsWith(File.separator)? filename : File.separator + filename);
代码示例来源:origin: wildfly/wildfly
String[] components=Util.components(path, File.separator);
if(components == null)
return false;
代码示例来源:origin: wildfly/wildfly
String[] comps=Util.components(local_path, File.separator);
String filename=comps[comps.length - 1];
target_path=target_path + (target_path.equals(File.separator)? filename : File.separator + filename);
代码示例来源:origin: org.jboss.eap/wildfly-client-all
protected static String filename(String full_path) {
String[] comps=Util.components(full_path, File.separator);
return comps != null? comps[comps.length -1] : null;
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
protected static String trim(String str) {
if(str == null) return null;
str=str.trim();
if(str.equals(File.separator))
return str;
String[] comps=Util.components(str, File.separator);
return comps != null && comps.length > 0? comps[comps.length-1] : null;
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
/**
* Verifies whether child is a child (dir or file) of parent
* @param parent
* @param child
* @return True if child is a child, false otherwise
*/
protected static boolean isChildOf(String parent, String child) {
if(parent == null || child == null)
return false;
if(!child.startsWith(parent))
return false;
if(child.length() <= parent.length())
return false;
int from=parent.equals(File.separator)? parent.length() : parent.length() +1;
// if(from-1 > child.length())
// return false;
String[] comps=Util.components(child.substring(from), File.separator);
return comps != null && comps.length <= 1;
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
String[] comps=Util.components(grid_path, File.separator);
String filename=comps[comps.length - 1];
target_path=target_path + (target_path.endsWith(File.separator)? filename : File.separator + filename);
代码示例来源:origin: org.jboss.eap/wildfly-client-all
String[] components=Util.components(path, File.separator);
if(components == null)
return false;
代码示例来源:origin: org.jboss.eap/wildfly-client-all
String[] comps=Util.components(local_path, File.separator);
String filename=comps[comps.length - 1];
target_path=target_path + (target_path.equals(File.separator)? filename : File.separator + filename);
内容来源于网络,如有侵权,请联系作者删除!