本文整理了Java中org.jboss.resteasy.spi.HttpRequest.setInputStream()
方法的一些代码示例,展示了HttpRequest.setInputStream()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpRequest.setInputStream()
方法的具体详情如下:
包路径:org.jboss.resteasy.spi.HttpRequest
类名称:HttpRequest
方法名:setInputStream
[英]If you are using a servlet container, this will NOT override the HttpServletRequest.getInputStream(). It will only override it for the resteasy HttpRequest
[中]如果您使用的是servlet容器,这将不会覆盖HttpServletRequest。getInputStream()。它将仅覆盖resteasy HttpRequest的它
代码示例来源:origin: resteasy/Resteasy
@Override
public void setEntityStream(InputStream entityStream)
{
httpRequest.setInputStream(entityStream);
}
代码示例来源:origin: resteasy/Resteasy
@Override
public void setInputStream(InputStream stream)
{
delegate.setInputStream(stream);
}
代码示例来源:origin: resteasy/Resteasy
ByteArrayOutputStream targetOutputStream = new ByteArrayOutputStream();
mapper.writeValue(targetOutputStream, result);
request.setInputStream(new ByteArrayInputStream(targetOutputStream.toByteArray()));
request.setHttpMethod("PATCH");
代码示例来源:origin: org.jboss.resteasy/resteasy-jaxrs-20
@Override
public void setInputStream(InputStream stream)
{
delegate.setInputStream(stream);
}
代码示例来源:origin: org.jboss.resteasy/resteasy-jaxrs-20
@Override
public void setEntityStream(InputStream entityStream)
{
httpRequest.setInputStream(entityStream);
}
代码示例来源:origin: org.jboss.resteasy/resteasy-core
@Override
public void setInputStream(InputStream stream)
{
delegate.setInputStream(stream);
}
代码示例来源:origin: org.jboss.resteasy/resteasy-core
@Override
public void setEntityStream(InputStream entityStream)
{
httpRequest.setInputStream(entityStream);
}
代码示例来源:origin: resteasy/Resteasy
@Override
protected Object decode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception
{
if (!(msg instanceof org.jboss.netty.handler.codec.http.HttpRequest))
{
return msg;
}
org.jboss.netty.handler.codec.http.HttpRequest request = (org.jboss.netty.handler.codec.http.HttpRequest) msg;
boolean keepAlive = org.jboss.netty.handler.codec.http.HttpHeaders.isKeepAlive(request) & isKeepAlive;
NettyHttpResponse response = new NettyHttpResponse(channel, keepAlive, request.getMethod());
ResteasyHttpHeaders headers = null;
ResteasyUriInfo uriInfo = null;
try
{
headers = NettyUtil.extractHttpHeaders(request);
uriInfo = NettyUtil.extractUriInfo(request, servletMappingPrefix, proto);
HttpRequest nettyRequest = new NettyHttpRequest(headers, uriInfo, request.getMethod().getName(), dispatcher, response, org.jboss.netty.handler.codec.http.HttpHeaders.is100ContinueExpected(request) );
ChannelBufferInputStream is = new ChannelBufferInputStream(request.getContent());
nettyRequest.setInputStream(is);
return nettyRequest;
}
catch (Exception e)
{
response.sendError(400);
// made it warn so that people can filter this.
LogMessages.LOGGER.warn(Messages.MESSAGES.failedToParseRequest(), e);
return null;
}
}
代码示例来源:origin: org.jboss.resteasy/resteasy-jackson2-provider
ByteArrayOutputStream targetOutputStream = new ByteArrayOutputStream();
mapper.writeValue(targetOutputStream, result);
request.setInputStream(new ByteArrayInputStream(targetOutputStream.toByteArray()));
request.setHttpMethod("PATCH");
代码示例来源:origin: org.jboss.resteasy/resteasy-netty
HttpRequest nettyRequest = new NettyHttpRequest(headers, uriInfo, request.getMethod().getName(), dispatcher, response, org.jboss.netty.handler.codec.http.HttpHeaders.is100ContinueExpected(request) );
ChannelBufferInputStream is = new ChannelBufferInputStream(request.getContent());
nettyRequest.setInputStream(is);
return nettyRequest;
内容来源于网络,如有侵权,请联系作者删除!