Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.makumba.commons.attributes
Class MultipartHttpParameters

    java.lang.Object
      org.makumba.commons.attributes.HttpParameters
          org.makumba.commons.attributes.MultipartHttpParameters

    public class MultipartHttpParameters

extends HttpParameters

Parses the input stream of a http request as a multipart/form-data. Stores uploaded files as org.makumba.Text. Normal http parameters are stored as Text.toString (simple) or Vectors (multiple) data inside the request:

- 1st line: boundary + CR+LF
- headers & values + CR+LF (e.g. filename="file.doc" Content-Type: application/octec-stream)
- CR+LF (Konqueror 3.2.1 sends CR CR)
- content (related to the headers just read)
- CR+LF - boundary CR+LF - headers... and so forth ...
- and after the last boundary you will have '--' with CR+LF

Version:
  $Id: MultipartHttpParameters.java 1726 2007-10-02 09:11:59Z manuel_gay $
Author:
  Cristian Bogdan, Andreas Pesenhofer, Rudolf Mayer

Field Summary
`(package private) static org.apache.commons.fileupload.disk.DiskFileItemFactory` | `factory`
`(package private) Hashtable<String,Object>` | `parameters`

Fields inherited from class org.makumba.commons.attributes.HttpParameters
`atStart, request`

Constructor Summary
`MultipartHttpParameters(HttpServletRequest req)`

Method Summary
`(package private) void` | `addParameter(String name, String value)`
`(package private) static Object` | `compose(Object a1, Object a2)` TODO this should not be here but in a util class Composes two objects, if both are vectors, unites them
`(package private) void` | `computeAtStart()`
`Object` | `getParameter(String s)` Composes what is read from the multipart with what is in the query string.
`boolean` | `knownAtStart(String s)`

Methods inherited from class org.makumba.commons.attributes.HttpParameters
`getParametersStartingWith, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### parameters

    Hashtable<String,Object> parameters

### factory

    static org.apache.commons.fileupload.disk.DiskFileItemFactory factory

Constructor Detail

### MultipartHttpParameters

    public MultipartHttpParameters(HttpServletRequest req)

Method Detail

### computeAtStart

    void computeAtStart()

  Overrides:
    `computeAtStart` in class `HttpParameters`

### knownAtStart

    public boolean knownAtStart(String s)

  Overrides:
    `knownAtStart` in class `HttpParameters`

### addParameter

    void addParameter(String name,
                      String value)

### getParameter

    public Object getParameter(String s)

  Composes what is read from the multipart with what is in the query string. The assumption is that the multipart cannot change during execution, while the query string may change due to e.g. forwards

  Overrides:
    `getParameter` in class `HttpParameters`
  Parameters:
    `s` - the query string
  Returns:
    An Object holding the parameters

### compose

    static Object compose(Object a1,
                          Object a2)

  TODO this should not be here but in a util class Composes two objects, if both are vectors, unites them

  Parameters:
    `a1` - the first object
    `a2` - the second object
  Returns:
    a composed object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Docs generated on 2009-02-25 14:20