本文整理了Java中org.apache.catalina.connector.Request.getInputStream
方法的一些代码示例,展示了Request.getInputStream
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getInputStream
方法的具体详情如下:
包路径:org.apache.catalina.connector.Request
类名称:Request
方法名:getInputStream
[英]Return the servlet input stream for this Request. The default implementation returns a servlet input stream created by createInputStream()
.
[中]返回此请求的servlet输入流。默认实现返回由createInputStream()
创建的servlet输入流。
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6
public InputStream getInputStream() throws IOException {
return request.getInputStream();
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat
public InputStream getInputStream() throws IOException {
return request.getInputStream();
}
代码示例来源:origin: org.jboss.web/jbossweb
public AbstractServletInputStream getInputStream() throws IOException {
return (AbstractServletInputStream) request.getInputStream();
}
代码示例来源:origin: org.glassfish.main.web/web-core
@Override
public ServletInputStream getInputStream() throws IOException {
if (request == null) {
throw new IllegalStateException(rb.getString(LogFacade.CANNOT_USE_REQUEST_OBJECT_OUTSIDE_SCOPE_EXCEPTION));
}
return request.getInputStream();
}
代码示例来源:origin: org.keycloak/spring-boot-container-bundle
@Override
public InputStream getInputStream(boolean buffered) {
if (inputStream != null) {
return inputStream;
}
if (buffered) {
try {
return inputStream = new BufferedInputStream(request.getInputStream());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
try {
return request.getInputStream();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: org.keycloak/keycloak-tomcat-adapter-spi
@Override
public InputStream getInputStream(boolean buffered) {
if (inputStream != null) {
return inputStream;
}
if (buffered) {
try {
return inputStream = new BufferedInputStream(request.getInputStream());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
try {
return request.getInputStream();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
@Override
public ServletInputStream getInputStream() throws IOException {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getInputStream();
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
@Override
public ServletInputStream getInputStream() throws IOException {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getInputStream();
}
代码示例来源:origin: tomcat/catalina
public ServletInputStream getInputStream() throws IOException {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getInputStream();
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
@Override
public ServletInputStream getInputStream() throws IOException {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getInputStream();
}
代码示例来源:origin: codefollower/Tomcat-Research
@Override
public ServletInputStream getInputStream() throws IOException {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getInputStream();
}
代码示例来源:origin: org.jboss.web/jbossweb
public ServletInputStream getInputStream() throws IOException {
if (request == null) {
throw MESSAGES.nullRequestFacade();
}
return request.getInputStream();
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
@Override
public ServletInputStream getInputStream() throws IOException {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getInputStream();
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
public ServletInputStream getInputStream() throws IOException {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getInputStream();
}
代码示例来源:origin: jboss.web/jbossweb
public ServletInputStream getInputStream() throws IOException {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getInputStream();
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
@Override
public ServletInputStream getInputStream() throws IOException {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getInputStream();
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public ServletInputStream getInputStream() throws IOException {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getInputStream();
}
代码示例来源:origin: com.tomitribe.tribestream/tribestream-container
/**
* If you need the stream more than once. On first call you need {@link #consumeAndCacheInputStream()}
*
* @return
*/
public Optional<InputStream> consumeInputStream() {
try {
if (isNull(payloadCache)) {
// normal case. Reactive forwarding. Consume once.
return Optional.of(request.getInputStream());
} else {
// when handling multipart or digest handlers
return Optional.of(new ByteArrayInputStream(payloadCache.toByteArray()));
}
} catch (final IOException e) {
LOGGER.severe(ProxyCodes.CANNOT_READ_INCOMING_PAYLOAD, "Can not read incoming payload for request URI {0}", e, getIn().getRequestUri());
}
return Optional.empty();
}
代码示例来源:origin: com.tomitribe.tribestream/tribestream-container
private ByteArrayOutputStream readIncomingPayload() {
try {
LOGGER.finest(ProxyCodes.READ_INCOMING_PAYLOAD, "Starting reading payload incoming request URI {0}", getIn().getRequestUri());
final ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
try {
final ServletInputStream sis = request.getInputStream();
copy(baos, sis);
baos.flush();
} catch (final IllegalStateException ise) {
final ReaderInputStream ris = new ReaderInputStream(request.getReader());
copy(baos, ris);
baos.flush();
}
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.finest(ProxyCodes.PAYLOAD_INCOMING_REQUEST, "Payload for incoming request URI {0} is {1}",
getIn().getRequestUri(), new String(baos.toByteArray(), StandardCharsets.UTF_8));
}
return baos;
} catch (final IOException e) {
LOGGER.severe(ProxyCodes.CANNOT_READ_INCOMING_PAYLOAD, "Can not read incoming payload for request URI {0}", e, getIn().getRequestUri());
}
return null;
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
InputStream is = request.getInputStream();
内容来源于网络,如有侵权,请联系作者删除!