Паттерн: Шаблонный метод (Template Method)
Фрагмент: RequestProcessor.processMultipart() [java]
  1. protected HttpServletRequest processMultipart(HttpServletRequest request) {
  2. if (!"POST".equalsIgnoreCase(request.getMethod())) {
  3. return (request);
  4. }
  5.  
  6. String contentType = request.getContentType();
  7.  
  8. if ((contentType != null)
  9. && contentType.startsWith("multipart/form-data")) {
  10. return (new MultipartRequestWrapper(request));
  11. } else {
  12. return (request);
  13. }
  14. }