本文整理了Java中com.simiacryptus.util.Util.stripPrefix()
方法的一些代码示例,展示了Util.stripPrefix()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.stripPrefix()
方法的具体详情如下:
包路径:com.simiacryptus.util.Util
类名称:Util
方法名:stripPrefix
[英]Strip prefix string.
[中]带前缀字符串。
代码示例来源:origin: com.simiacryptus/literate-reporting
/**
* Resolve resource file.
*
* @param name the name
* @return the file
*/
@Nonnull
public File resolveResource(@Nonnull final CharSequence name) {
return new File(getResourceDir(), Util.stripPrefix(name.toString(), "etc/"));
}
代码示例来源:origin: com.simiacryptus/java-util
/**
* Resolve resource file.
*
* @param name the name
* @return the file
*/
@Nonnull
public File resolveResource(@Nonnull final CharSequence name) {
return new File(getResourceDir(), Util.stripPrefix(name.toString(), "etc/"));
}
代码示例来源:origin: com.simiacryptus/java-util
/**
* Code file string.
*
* @param file the file
* @return the string
*/
public CharSequence pathTo(@javax.annotation.Nonnull File file) {
return stripPrefix(Util.toString(pathToFile(getReportFile(), file)), "/");
}
代码示例来源:origin: com.simiacryptus/literate-reporting
/**
* Code file string.
*
* @param file the file
* @return the string
*/
public CharSequence pathTo(@javax.annotation.Nonnull File file) {
return stripPrefix(Util.toString(pathToFile(getReportFile(), file)), "/");
}
代码示例来源:origin: com.simiacryptus/java-util
@Override
public Response serve(final IHTTPSession session) {
String requestPath = Util.stripPrefix(session.getUri(), "/");
@javax.annotation.Nonnull final File file = new File(root, requestPath);
if (session.getMethod() == Method.GET) {
代码示例来源:origin: com.simiacryptus/literate-reporting
@Override
public Response serve(final IHTTPSession session) {
String requestPath = Util.stripPrefix(session.getUri(), "/");
@javax.annotation.Nonnull final File file = new File(root, requestPath);
if (session.getMethod() == Method.GET) {
内容来源于网络,如有侵权,请联系作者删除!