本文整理了Java中ro.pippo.core.Response.getOutputStream
方法的一些代码示例,展示了Response.getOutputStream
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.getOutputStream
方法的具体详情如下:
包路径:ro.pippo.core.Response
类名称:Response
方法名:getOutputStream
暂无
代码示例来源:origin: pippo-java/pippo
@Override
public void handle(RouteContext routeContext) {
Response response = routeContext.getResponse().noCache().text();
if (threadDump != null) {
threadDump.dump(response.getOutputStream());
} else {
response.internalError().send("Sorry your runtime environment does not allow to dump threads");
}
}
代码示例来源:origin: com.gitblit.fathom/fathom-rest
@Override
protected void writeObject(Context context, Object result) {
try {
context.getResponse()
.contentType(CONTENT_TYPE)
.header(CLASS_NAME, result == null ? NULL : result.getClass().getName());
if (result != null) {
GZIPOutputStream zipStream = new GZIPOutputStream(new BufferedOutputStream(context.getResponse().getOutputStream()));
ObjectOutputStream replyStream = new ObjectOutputStream(zipStream);
replyStream.writeObject(result);
zipStream.finish();
replyStream.flush();
}
} catch (IOException e) {
}
}
}
代码示例来源:origin: gitblit/fathom
@Override
protected void writeObject(Context context, Object result) {
try {
context.getResponse()
.contentType(CONTENT_TYPE)
.header(CLASS_NAME, result == null ? NULL : result.getClass().getName());
if (result != null) {
GZIPOutputStream zipStream = new GZIPOutputStream(new BufferedOutputStream(context.getResponse().getOutputStream()));
ObjectOutputStream replyStream = new ObjectOutputStream(zipStream);
replyStream.writeObject(result);
zipStream.finish();
replyStream.flush();
}
} catch (IOException e) {
}
}
}
代码示例来源:origin: com.gitblit.fathom/fathom-rest
protected void writeObject(Context context, Object result) {
try {
context.getResponse()
.contentType(CONTENT_TYPE)
.header(CLASS_NAME, result == null ? NULL : result.getClass().getName());
if (result != null) {
ObjectOutputStream replyStream = new ObjectOutputStream(context.getResponse().getOutputStream());
replyStream.writeObject(result);
replyStream.flush();
}
} catch (IOException e) {
}
}
}
代码示例来源:origin: gitblit/fathom
protected void writeObject(Context context, Object result) {
try {
context.getResponse()
.contentType(CONTENT_TYPE)
.header(CLASS_NAME, result == null ? NULL : result.getClass().getName());
if (result != null) {
ObjectOutputStream replyStream = new ObjectOutputStream(context.getResponse().getOutputStream());
replyStream.writeObject(result);
replyStream.flush();
}
} catch (IOException e) {
}
}
}
代码示例来源:origin: ro.pippo/pippo-metrics
@Override
public void handle(RouteContext routeContext) {
Response response = routeContext.getResponse().noCache().text();
if (threadDump != null) {
threadDump.dump(response.getOutputStream());
} else {
response.internalError().send("Sorry your runtime environment does not allow to dump threads");
}
}
代码示例来源:origin: com.gitblit.fathom/fathom-xmlrpc
try (OutputStream output = context.getResponse().getOutputStream()) {
output.write(result);
output.flush();
代码示例来源:origin: gitblit/fathom
try (OutputStream output = context.getResponse().getOutputStream()) {
output.write(result);
output.flush();
内容来源于网络,如有侵权,请联系作者删除!