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

## org.apache.tomcat.util.http.fileupload.servlet
Class ServletRequestContext

    java.lang.Object
      org.apache.tomcat.util.http.fileupload.servlet.ServletRequestContext

All Implemented Interfaces:
  RequestContext

    public class ServletRequestContext

extends Object
implements RequestContext

Provides access to the request information needed for a request made to an HTTP servlet.

Since:
  FileUpload 1.1
Version:
  $Id: ServletRequestContext.java 1154575 2011-08-06 20:19:29Z markt $
Author:
  Martin Cooper

Constructor Summary
`ServletRequestContext(HttpServletRequest request)` Construct a context for this request.

Method Summary
`String` | `getCharacterEncoding()` Retrieve the character encoding for the request.
`int` | `getContentLength()` Retrieve the content length of the request.
`String` | `getContentType()` Retrieve the content type of the request.
`InputStream` | `getInputStream()` Retrieve the input stream for the request.
`String` | `toString()` Returns a string representation of this object.

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

Constructor Detail

### ServletRequestContext

    public ServletRequestContext(HttpServletRequest request)

  Construct a context for this request.

  Parameters:
    `request` - The request to which this context applies.

Method Detail

### getCharacterEncoding

    public String getCharacterEncoding()

  Retrieve the character encoding for the request.

  Specified by:
    `getCharacterEncoding` in interface `RequestContext`
  Returns:
    The character encoding for the request.

### getContentType

    public String getContentType()

  Retrieve the content type of the request.

  Specified by:
    `getContentType` in interface `RequestContext`
  Returns:
    The content type of the request.

### getContentLength

    public int getContentLength()

  Retrieve the content length of the request.

  Specified by:
    `getContentLength` in interface `RequestContext`
  Returns:
    The content length of the request.

### getInputStream

    public InputStream getInputStream()
                               throws IOException

  Retrieve the input stream for the request.

  Specified by:
    `getInputStream` in interface `RequestContext`
  Returns:
    The input stream for the request.
  Throws:
    `IOException` - if a problem occurs.

### toString

    public String toString()

  Returns a string representation of this object.

  Overrides:
    `toString` in class `Object`
  Returns:
    a string representation of this object.

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

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.