final long contentLength = request.getContentLength();
while ((len = r.read(buffer)) >= 0 && count < contentLength) {
count += len;
builder.append(buffer, 0, len);
}
compiledQuery = xquery.compile(context, new StringSource(builder.toString()));
} catch (final XPathException ex) {
throw new EXistException("Cannot compile xquery.", ex);
} catch (final IOException ex) {
throw new EXistException(