本文整理了Java中java.lang.StringBuffer.append()
方法的一些代码示例,展示了StringBuffer.append()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StringBuffer.append()
方法的具体详情如下:
包路径:java.lang.StringBuffer
类名称:StringBuffer
方法名:append
[英]Adds the specified character to the end of this buffer.
[中]
代码示例来源:origin: spring-projects/spring-framework
private static URI initUri(HttpServletRequest request) throws URISyntaxException {
Assert.notNull(request, "'request' must not be null");
StringBuffer url = request.getRequestURL();
String query = request.getQueryString();
if (StringUtils.hasText(query)) {
url.append('?').append(query);
}
return new URI(url.toString());
}
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeMessage(String msg) {
message.append(msg);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeMessage(String msg) {
message.append(msg);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeMessage(String msg) {
message.append(msg);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeMessage(String msg) {
message.append(msg);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeMessage(String msg) {
message.append(msg);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeBodyContent(String content) {
result.append(content);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeMessage(String msg) {
message.append(msg);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeMessage(String msg) {
message.append(msg);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeMessage(String msg) {
message.append(msg);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeMessage(String msg) {
message.append(msg);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeMessage(String msg) {
message.append(msg);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeMessage(String msg) {
message.append(msg);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeMessage(String msg) {
message.append(msg);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeBodyContent(String content) {
result.append(content);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeBodyContent(String content) {
result.append(content);
}
};
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void writeMessage(String msg) {
message.append(msg);
}
};
代码示例来源:origin: spring-projects/spring-framework
private static String format(String[] names) {
StringBuffer sb = new StringBuffer();
sb.append("(");
for (int i = 0; i < names.length; i++) {
sb.append(names[i]);
if ((i + 1) < names.length) {
sb.append(",");
}
}
sb.append(")");
return sb.toString();
}
代码示例来源:origin: spring-projects/spring-framework
@Test
public void requestURLNewStringBuffer() throws Exception {
this.request.addHeader(X_FORWARDED_PREFIX, "/prefix/");
this.request.setRequestURI("/mvc-showcase");
HttpServletRequest actual = filterAndGetWrappedRequest();
actual.getRequestURL().append("?key=value");
assertEquals("http://localhost/prefix/mvc-showcase", actual.getRequestURL().toString());
}
代码示例来源:origin: spring-projects/spring-framework
@Override
protected void customizeContext(ServletContext sc, ConfigurableWebApplicationContext wac) {
assertNotNull("The ServletContext should not be null.", sc);
assertEquals("Verifying that we received the expected ServletContext.", sc, sc);
assertFalse("The ApplicationContext should not yet have been refreshed.", wac.isActive());
buffer.append(expectedContents);
}
};
内容来源于网络,如有侵权,请联系作者删除!