use of org.lastaflute.web.ruts.multipart.exception.MultipartExceededException in project fess by codelibs.
the class FessMultipartRequestHandler method handleSizeLimitExceededException.
protected void handleSizeLimitExceededException(final HttpServletRequest request, final SizeLimitExceededException e) {
final long actual = e.getActualSize();
final long permitted = e.getPermittedSize();
final String msg = "Exceeded size of the multipart request: actual=" + actual + " permitted=" + permitted;
request.setAttribute(MAX_LENGTH_EXCEEDED_KEY, new MultipartExceededException(msg, actual, permitted, e));
try {
final InputStream is = request.getInputStream();
try {
final byte[] buf = new byte[1024];
while ((is.read(buf)) != -1) {
}
} catch (final Exception ignored) {
} finally {
try {
is.close();
} catch (final Exception ignored) {
}
}
} catch (final Exception ignored) {
}
}
Aggregations