StreamUtils.updateStream(in, out, 8 * 1024);
} else {
try {
Class filterClass = Class.forName(filterClassName);
UploadFilter f = (UploadFilter) filterClass.newInstance();
f.filter(file, out);
} catch (Exception e) {
e.printStackTrace();
throw new ServletException("Fails to filter upload data: " +
e.getMessage());