本文整理了Java中org.restlet.data.Reference.hasScheme
方法的一些代码示例,展示了Reference.hasScheme
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Reference.hasScheme
方法的具体详情如下:
包路径:org.restlet.data.Reference
类名称:Reference
方法名:hasScheme
[英]Indicates if this reference has a scheme component.
[中]指示此引用是否包含方案组件。
代码示例来源:origin: org.restlet/org.restlet
/**
* Returns the scheme component.<br>
* Note that no URI decoding is done by this method.
*
* @return The scheme component.
*/
public String getScheme() {
if (hasScheme()) {
// Scheme found
return this.internalRef.substring(0, this.schemeIndex);
}
// No scheme found
return null;
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the scheme component.<br>
* Note that no URI decoding is done by this method.
*
* @return The scheme component.
*/
public String getScheme() {
if (hasScheme()) {
// Scheme found
return this.internalRef.substring(0, this.schemeIndex);
}
// No scheme found
return null;
}
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* Returns the scheme component.<br>
* Note that no URI decoding is done by this method.
*
* @return The scheme component.
*/
public String getScheme() {
if (hasScheme()) {
// Scheme found
return this.internalRef.substring(0, this.schemeIndex);
}
// No scheme found
return null;
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the scheme specific part.<br>
* Note that no URI decoding is done by this method.
*
* @return The scheme specific part.
*/
public String getSchemeSpecificPart() {
String result = null;
if (hasScheme()) {
// Scheme found
if (hasFragment()) {
// Fragment found
result = this.internalRef.substring(this.schemeIndex + 1,
this.fragmentIndex);
} else {
// No fragment found
result = this.internalRef.substring(this.schemeIndex + 1);
}
}
return result;
}
代码示例来源:origin: org.restlet/org.restlet
/**
* Returns the scheme specific part.<br>
* Note that no URI decoding is done by this method.
*
* @return The scheme specific part.
*/
public String getSchemeSpecificPart() {
String result = null;
if (hasScheme()) {
// Scheme found
if (hasFragment()) {
// Fragment found
result = this.internalRef.substring(this.schemeIndex + 1,
this.fragmentIndex);
} else {
// No fragment found
result = this.internalRef.substring(this.schemeIndex + 1);
}
}
return result;
}
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* Returns the scheme specific part.<br>
* Note that no URI decoding is done by this method.
*
* @return The scheme specific part.
*/
public String getSchemeSpecificPart() {
String result = null;
if (hasScheme()) {
// Scheme found
if (hasFragment()) {
// Fragment found
result = this.internalRef.substring(this.schemeIndex + 1,
this.fragmentIndex);
} else {
// No fragment found
result = this.internalRef.substring(this.schemeIndex + 1);
}
}
return result;
}
代码示例来源:origin: org.restlet.osgi/org.restlet
if (hasScheme()) {
代码示例来源:origin: org.restlet/org.restlet
if (hasScheme()) {
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
if (hasScheme()) {
代码示例来源:origin: org.restlet.osgi/org.restlet
if (hasScheme()) {
代码示例来源:origin: org.restlet/org.restlet
if (hasScheme()) {
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
if (hasScheme()) {
代码示例来源:origin: org.restlet/org.restlet
if (hasScheme()) {
代码示例来源:origin: org.restlet.osgi/org.restlet
if (hasScheme()) {
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
if (hasScheme()) {
代码示例来源:origin: org.restlet/org.restlet
/**
* Sets the relative part for relative references only.
*
* @param relativePart
* The relative part to set.
*/
public void setRelativePart(String relativePart) {
relativePart = encodeInvalidCharacters(relativePart);
if (relativePart == null) {
relativePart = "";
}
if (!hasScheme()) {
// This is a relative reference, no scheme found
if (hasQuery()) {
// Query found
this.internalRef = relativePart
+ this.internalRef.substring(this.queryIndex);
} else if (hasFragment()) {
// Fragment found
this.internalRef = relativePart
+ this.internalRef.substring(this.fragmentIndex);
} else {
// No fragment found
this.internalRef = relativePart;
}
}
updateIndexes();
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Sets the relative part for relative references only.
*
* @param relativePart
* The relative part to set.
*/
public void setRelativePart(String relativePart) {
relativePart = encodeInvalidCharacters(relativePart);
if (relativePart == null) {
relativePart = "";
}
if (!hasScheme()) {
// This is a relative reference, no scheme found
if (hasQuery()) {
// Query found
this.internalRef = relativePart
+ this.internalRef.substring(this.queryIndex);
} else if (hasFragment()) {
// Fragment found
this.internalRef = relativePart
+ this.internalRef.substring(this.fragmentIndex);
} else {
// No fragment found
this.internalRef = relativePart;
}
}
updateIndexes();
}
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* Sets the relative part for relative references only.
*
* @param relativePart
* The relative part to set.
*/
public void setRelativePart(String relativePart) {
relativePart = encodeInvalidCharacters(relativePart);
if (relativePart == null) {
relativePart = "";
}
if (!hasScheme()) {
// This is a relative reference, no scheme found
if (hasQuery()) {
// Query found
this.internalRef = relativePart
+ this.internalRef.substring(this.queryIndex);
} else if (hasFragment()) {
// Fragment found
this.internalRef = relativePart
+ this.internalRef.substring(this.fragmentIndex);
} else {
// No fragment found
this.internalRef = relativePart;
}
}
updateIndexes();
}
内容来源于网络,如有侵权,请联系作者删除!