本文整理了Java中com.sun.grizzly.tcp.http11.GrizzlyResponse.getOutputStream()
方法的一些代码示例,展示了GrizzlyResponse.getOutputStream()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GrizzlyResponse.getOutputStream()
方法的具体详情如下:
包路径:com.sun.grizzly.tcp.http11.GrizzlyResponse
类名称:GrizzlyResponse
方法名:getOutputStream
[英]Return the servlet output stream associated with this Response.
[中]返回与此响应关联的servlet输出流。
代码示例来源:origin: org.jvnet.jax-ws-commons/jaxws-grizzly-httpspi
@Override
public OutputStream getResponseBody() throws IOException {
return response.getOutputStream();
}
代码示例来源:origin: com.sun.grizzly/grizzly-utils
} catch (IllegalStateException ise1) {
try {
getOutputStream().print(sb.toString());
} catch (IllegalStateException ise2) {
代码示例来源:origin: com.sun.jersey/jersey-bundle
public OutputStream writeStatusAndHeaders(long contentLength,
ContainerResponse cResponse) throws IOException {
final javax.ws.rs.core.Response.StatusType statusInfo = cResponse.getStatusType();
if (statusInfo.getReasonPhrase() == null) {
response.setStatus(statusInfo.getStatusCode());
} else {
response.setStatus(statusInfo.getStatusCode(), statusInfo.getReasonPhrase());
}
if (contentLength != -1 && contentLength < Integer.MAX_VALUE)
response.setContentLength((int)contentLength);
for (Map.Entry<String, List<Object>> e : cResponse.getHttpHeaders().entrySet()) {
for (Object value : e.getValue()) {
response.addHeader(e.getKey(), ContainerResponse.getHeaderValue(value));
}
}
String contentType = response.getHeader("Content-Type");
if (contentType != null) {
response.setContentType(contentType);
}
return response.getOutputStream();
}
内容来源于网络,如有侵权,请联系作者删除!