contentType.toLowerCase()
.startsWith("application/x-www-form-urlencoded") &&
cRequest.getMethod().equalsIgnoreCase("POST")) {
// Wrapping the already read POST data in a bounded InputStream.
HttpFormData data = new HttpFormData(request);
in = new ContentLengthInputStream(new ByteArrayInputStream(
data.getData()), data.getLength());
} else {
// Using the standard InputStream of the request.
in = new ContentLengthInputStream(cRequest.getInputStream(),
contentLength);
}
return in;
}