本文整理了Java中org.apache.catalina.connector.Request.getStream
方法的一些代码示例,展示了Request.getStream
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getStream
方法的具体详情如下:
包路径:org.apache.catalina.connector.Request
类名称:Request
方法名:getStream
[英]Return the input stream associated with this Request.
[中]返回与此请求关联的输入流。
代码示例来源:origin: org.glassfish.main.security/websecurity
public InputStream getStream() {
return httpRequest.getStream();
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Read post body in an array.
*/
protected int readPostBody(byte body[], int len)
throws IOException {
int offset = 0;
do {
int inputLen = getStream().read(body, offset, len - offset);
if (inputLen <= 0) {
return offset;
}
offset += inputLen;
} while ((len - offset) > 0);
return len;
}
代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib
/* */ protected int readPostBody(byte[] body, int len)
/* */ throws IOException
/* */ {
/* 2482 */ int offset = 0;
/* */ do {
/* 2484 */ int inputLen = getStream().read(body, offset, len - offset);
/* 2485 */ if (inputLen <= 0) {
/* 2486 */ return offset;
/* */ }
/* 2488 */ offset += inputLen;
/* 2489 */ }while (len - offset > 0);
/* 2490 */ return len;
/* */ }
/* */
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Read post body in an array.
*/
protected int readPostBody(byte body[], int len)
throws IOException {
int offset = 0;
do {
int inputLen = getStream().read(body, offset, len - offset);
if (inputLen <= 0) {
return offset;
}
offset += inputLen;
} while ((len - offset) > 0);
return len;
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Read post body in an array.
*/
protected int readPostBody(byte body[], int len)
throws IOException {
int offset = 0;
do {
int inputLen = getStream().read(body, offset, len - offset);
if (inputLen <= 0) {
return offset;
}
offset += inputLen;
} while ((len - offset) > 0);
return len;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Read post body in an array.
*/
protected int readPostBody(byte body[], int len)
throws IOException {
int offset = 0;
do {
int inputLen = getStream().read(body, offset, len - offset);
if (inputLen <= 0) {
return offset;
}
offset += inputLen;
} while ((len - offset) > 0);
return len;
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Read post body in an array.
*/
protected int readPostBody(byte body[], int len)
throws IOException {
int offset = 0;
do {
int inputLen = getStream().read(body, offset, len - offset);
if (inputLen <= 0) {
return offset;
}
offset += inputLen;
} while ((len - offset) > 0);
return len;
}
代码示例来源:origin: tomcat/catalina
/**
* Read post body in an array.
*/
protected int readPostBody(byte body[], int len)
throws IOException {
int offset = 0;
do {
int inputLen = getStream().read(body, offset, len - offset);
if (inputLen <= 0) {
return offset;
}
offset += inputLen;
} while ((len - offset) > 0);
return len;
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Read post body in an array.
*/
protected int readPostBody(byte body[], int len)
throws IOException {
int offset = 0;
do {
int inputLen = getStream().read(body, offset, len - offset);
if (inputLen <= 0) {
return offset;
}
offset += inputLen;
} while ((len - offset) > 0);
return len;
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Read post body in an array.
*/
protected int readPostBody(byte body[], int len)
throws IOException {
int offset = 0;
do {
int inputLen = getStream().read(body, offset, len - offset);
if (inputLen <= 0) {
return offset;
}
offset += inputLen;
} while ((len - offset) > 0);
return len;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Read post body in an array.
*/
protected int readPostBody(byte body[], int len)
throws IOException {
int offset = 0;
do {
int inputLen = getStream().read(body, offset, len - offset);
if (inputLen <= 0) {
return offset;
}
offset += inputLen;
} while ((len - offset) > 0);
return len;
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Read post body in an array.
*
* @param body The bytes array in which the body will be read
* @param len The body length
* @return the bytes count that has been read
* @throws IOException if an IO exception occurred
*/
protected int readPostBody(byte[] body, int len)
throws IOException {
int offset = 0;
do {
int inputLen = getStream().read(body, offset, len - offset);
if (inputLen <= 0) {
return offset;
}
offset += inputLen;
} while ((len - offset) > 0);
return len;
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Read post body in an array.
*
* @param body The bytes array in which the body will be read
* @param len The body length
* @return the bytes count that has been read
* @throws IOException if an IO exception occurred
*/
protected int readPostBody(byte[] body, int len)
throws IOException {
int offset = 0;
do {
int inputLen = getStream().read(body, offset, len - offset);
if (inputLen <= 0) {
return offset;
}
offset += inputLen;
} while ((len - offset) > 0);
return len;
}
代码示例来源:origin: org.nuxeo.lib.runtime/nuxeo-runtime-tomcat-adapter
private void postReload(Request req, Response resp) throws IOException {
ClassLoader webLoader = req.getContext().getLoader().getClassLoader();
if (webLoader instanceof NuxeoDevWebappClassLoader) {
NuxeoDevWebappClassLoader loader = (NuxeoDevWebappClassLoader) webLoader;
DevFrameworkBootstrap bootstrap = loader.getBootstrap();
String devBundlesLocation = bootstrap.getDevBundlesLocation();
try {
Files.copy(req.getStream(), Paths.get(devBundlesLocation), StandardCopyOption.REPLACE_EXISTING);
// only if dev.bundles was modified
bootstrap.loadDevBundles();
resp.setStatus(200);
} catch (IOException e) {
log.error("Unable to write to dev.bundles", e);
resp.sendError(500, "Unable to write to dev.bundles");
} catch (RuntimeException e) {
log.error("Unable to reload dev.bundles", e);
resp.sendError(500, "Unable to reload dev.bundles");
}
}
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Read chunked post body.
*/
protected byte[] readChunkedPostBody() throws IOException {
ByteChunk body = new ByteChunk();
byte[] buffer = new byte[CACHED_POST_LEN];
int len = 0;
while (len > -1) {
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
// Too much data
throw new IllegalArgumentException(
sm.getString("coyoteRequest.postTooLarge"));
}
if (len > 0) {
body.append(buffer, 0, len);
}
}
if (body.getLength() < body.getBuffer().length) {
int length = body.getLength();
byte[] result = new byte[length];
System.arraycopy(body.getBuffer(), 0, result, 0, length);
return result;
} else {
return body.getBuffer();
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
代码示例来源:origin: org.jboss.web/jbossweb
len = getStream().read(buffer, 0, CACHED_POST_LEN);
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
内容来源于网络,如有侵权,请联系作者删除!