org.apache.tapestry.multipart
Interface IMultipartDecoder

All Known Implementing Classes:
DefaultMultipartDecoder

public interface IMultipartDecoder

Defines how a multipart HTTP request can be broken into individual elements (including file uploads).

Multipart decoder implementations must be threadsafe.

Since:
2.3
Version:
$Id: IMultipartDecoder.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Method Summary
 void cleanup(HttpServletRequest request)
          Invoked to release any resources needed by tghe decoder.
 void decode(HttpServletRequest request)
          Decodes the incoming request, identifying all the parts (values and uploaded files) contained within.
 String getString(HttpServletRequest request, String name)
          Returns the single value (or first value) for the parameter with the specified name.
 String[] getStrings(HttpServletRequest request, String name)
          Returns an array of values (possibly a single element array).
 IUploadFile getUploadFile(HttpServletRequest request, String name)
          Returns the uploaded file with the specified parameter name, or null if no such parameter was in the request.
 

Method Detail

decode

void decode(HttpServletRequest request)
Decodes the incoming request, identifying all the parts (values and uploaded files) contained within.


cleanup

void cleanup(HttpServletRequest request)
Invoked to release any resources needed by tghe decoder. In some cases, large incoming parts are written to temporary files; this method ensures those temporary files are deleted.


getString

String getString(HttpServletRequest request,
                 String name)
Returns the single value (or first value) for the parameter with the specified name. Returns null if no such parameter was in the request.


getStrings

String[] getStrings(HttpServletRequest request,
                    String name)
Returns an array of values (possibly a single element array). Returns null if no such parameter was in the request.


getUploadFile

IUploadFile getUploadFile(HttpServletRequest request,
                          String name)
Returns the uploaded file with the specified parameter name, or null if no such parameter was in the request.