// Wait for the body for jersey to handle form/json/xml params
if (shouldReadData(vertxRequest)) {
if (logger.isDebugEnabled()) {
container.logger().debug("DefaultJerseyHandler - handle request and read body: " + vertxRequest.uri());
}
final Buffer body = new Buffer();
vertxRequest.dataHandler(new Handler<Buffer>() {
public void handle(Buffer buff) {
body.appendBuffer(buff);
if (body.length() > maxBodySize) {
throw new RuntimeException("The input stream has exceeded the max allowed body size "
+ maxBodySize + ".");
}
}
});
vertxRequest.endHandler(new Handler<Void>() {
@Override
public void handle(Void event) {
InputStream inputStream = new FastByteArrayInputStream(body.getBytes());
DefaultJerseyHandler.this.handle(vertxRequest, inputStream);
}
});
} else {