net.i2p.servlet

## Class RequestWrapper

- java.lang.Object
- - net.i2p.servlet.RequestWrapper

-     public class RequestWrapper
      extends Object

  Refactored in 0.9.33 to use Servlet 3.0 API and remove dependency on old Jetty 5 MultiPartRequest code. See ticket 2109. Previous history: Required major changes for Jetty 6 to support change from MultiPartRequest to MultiPartFilter. See http://docs.codehaus.org/display/JETTY/File+Upload+in+jetty6 Unfortunately, Content-type not available until Jetty 8 See https://bugs.eclipse.org/bugs/show_bug.cgi?id=349110 So we could either extend and fix MultiPartFilter, and rewrite everything here, or copy MultiPartRequest into our war and fix it so it compiles with Jetty 6. We do the latter. The filter would have been added in web.xml, see that file, where it's commented out. Filter isn't supported until Tomcat 7 (Servlet 3.0)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RequestWrapper(HttpServletRequest httpRequest)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getAttribute(String string)`
    `int` | `getContentLength()`
    `String` | `getContentType()`
    `String` | `getContentType(String partName)`
    `String` | `getFilename(String partName)`
    `InputStream` | `getInputStream(String partName)`
    `String` | `getParameter(String name)`
    `String` | `getParameter(String name, String defaultValue)`
    `Enumeration<String>` | `getParameterNames()`
    `HttpSession` | `getSession()`
    `HttpSession` | `getSession(boolean b)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RequestWrapper

          public RequestWrapper(HttpServletRequest httpRequest)

      Parameters:
        `httpRequest` -

  - ### Method Detail

    - #### getAttribute

          public Object getAttribute(String string)

    - #### getContentLength

          public int getContentLength()

      Returns:
        The total length of the content.

    - #### getContentType

          public String getContentType()

      Returns:
        The content type of the request.

    - #### getContentType

          public String getContentType(String partName)

      Throws:
        `IllegalStateException` - if the request is too large

    - #### getFilename

          public String getFilename(String partName)

      Throws:
        `IllegalStateException` - if the request is too large

    - #### getInputStream

          public InputStream getInputStream(String partName)

      Throws:
        `IllegalStateException` - if the request is too large

    - #### getParameter

          public String getParameter(String name)

      Parameters:
        `name` - Specific parameter key
      Returns:
        parameter value

    - #### getParameter

          public String getParameter(String name,
                                     String defaultValue)

      Throws:
        `IllegalStateException` - if the request is too large

    - #### getParameterNames

          public Enumeration<String> getParameterNames()

      Returns:
        List of request parameter names
      Throws:
        `IllegalStateException` - if the request is too large

    - #### getSession

          public HttpSession getSession()

    - #### getSession

          public HttpSession getSession(boolean b)

      Parameters:
        `b` -