本文整理了Java中org.restlet.data.Reference.getRelativePart
方法的一些代码示例,展示了Reference.getRelativePart
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Reference.getRelativePart
方法的具体详情如下:
包路径:org.restlet.data.Reference
类名称:Reference
方法名:getRelativePart
[英]Returns the relative part of relative references, without the query and fragment. If the reference is absolute, then null is returned.
Note that no URI decoding is done by this method.
[中]返回相对引用的相对部分,不包含查询和片段。如果引用是绝对的,则返回null。
请注意,此方法不会执行URI解码。
代码示例来源:origin: org.restlet/org.restlet
/**
* Returns the optionnally decoded relative part.
*
* @param decode
* Indicates if the result should be decoded using the
* {@link #decode(String)} method.
* @return The optionnally decoded relative part.
* @see #getRelativePart()
*/
public String getRelativePart(boolean decode) {
return decode ? decode(getRelativePart()) : getRelativePart();
}
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* Returns the optionnally decoded relative part.
*
* @param decode
* Indicates if the result should be decoded using the
* {@link #decode(String)} method.
* @return The optionnally decoded relative part.
* @see #getRelativePart()
*/
public String getRelativePart(boolean decode) {
return decode ? decode(getRelativePart()) : getRelativePart();
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the optionnally decoded relative part.
*
* @param decode
* Indicates if the result should be decoded using the {@link #decode(String)} method.
* @return The optionnally decoded relative part.
* @see #getRelativePart()
*/
public String getRelativePart(boolean decode) {
return decode ? decode(getRelativePart()) : getRelativePart();
}
代码示例来源:origin: org.restlet/org.restlet
/**
* Returns the authority component for hierarchical identifiers. Includes
* the user info, host name and the host port number.<br>
* Note that no URI decoding is done by this method.
*
* @return The authority component for hierarchical identifiers.
*/
public String getAuthority() {
final String part = isRelative() ? getRelativePart()
: getSchemeSpecificPart();
if ((part != null) && part.startsWith("//")) {
int index = part.indexOf('/', 2);
if (index != -1) {
return part.substring(2, index);
}
index = part.indexOf('?');
if (index != -1) {
return part.substring(2, index);
}
return part.substring(2);
}
return null;
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the authority component for hierarchical identifiers. Includes
* the user info, host name and the host port number.<br>
* Note that no URI decoding is done by this method.
*
* @return The authority component for hierarchical identifiers.
*/
public String getAuthority() {
final String part = isRelative() ? getRelativePart()
: getSchemeSpecificPart();
if ((part != null) && part.startsWith("//")) {
int index = part.indexOf('/', 2);
if (index != -1) {
return part.substring(2, index);
}
index = part.indexOf('?');
if (index != -1) {
return part.substring(2, index);
}
return part.substring(2);
}
return null;
}
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* Returns the authority component for hierarchical identifiers. Includes
* the user info, host name and the host port number.<br>
* Note that no URI decoding is done by this method.
*
* @return The authority component for hierarchical identifiers.
*/
public String getAuthority() {
final String part = isRelative() ? getRelativePart()
: getSchemeSpecificPart();
if ((part != null) && part.startsWith("//")) {
int index = part.indexOf('/', 2);
if (index != -1) {
return part.substring(2, index);
}
index = part.indexOf('?');
if (index != -1) {
return part.substring(2, index);
}
return part.substring(2);
}
return null;
}
代码示例来源:origin: org.restlet/org.restlet
final String part = isRelative() ? getRelativePart()
: getSchemeSpecificPart();
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
String part = isRelative() ? getRelativePart()
: getSchemeSpecificPart();
代码示例来源:origin: org.restlet.osgi/org.restlet
String part = isRelative() ? getRelativePart()
: getSchemeSpecificPart();
代码示例来源:origin: org.restlet/org.restlet
final String oldPart = isRelative() ? getRelativePart()
: getSchemeSpecificPart();
String newPart;
代码示例来源:origin: org.restlet/org.restlet
final String oldPart = isRelative() ? getRelativePart()
: getSchemeSpecificPart();
String newPart = null;
代码示例来源:origin: org.restlet.osgi/org.restlet
final String oldPart = isRelative() ? getRelativePart()
: getSchemeSpecificPart();
String newPart = null;
代码示例来源:origin: org.restlet.osgi/org.restlet
final String oldPart = isRelative() ? getRelativePart()
: getSchemeSpecificPart();
String newPart;
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
final String oldPart = isRelative() ? getRelativePart()
: getSchemeSpecificPart();
String newPart = null;
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
final String oldPart = isRelative() ? getRelativePart()
: getSchemeSpecificPart();
String newPart;
代码示例来源:origin: org.restlet/org.restlet
reference.getBaseRef());
} else if (partName.equals("e")) {
result = reference.getRelativePart();
} else if (partName.equals("f")) {
result = reference.getFragment();
代码示例来源:origin: org.restlet.osgi/org.restlet
return reference.getAuthority();
case "e":
return reference.getRelativePart();
case "f":
return reference.getFragment();
内容来源于网络,如有侵权,请联系作者删除!