home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / servlet-api.jar / javax / servlet / ServletRequestWrapper.class (.txt) < prev    next >
Encoding:
Java Class File  |  2004-08-28  |  4.1 KB  |  149 lines

  1. package javax.servlet;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.IOException;
  5. import java.io.UnsupportedEncodingException;
  6. import java.util.Enumeration;
  7. import java.util.Locale;
  8. import java.util.Map;
  9.  
  10. public class ServletRequestWrapper implements ServletRequest {
  11.    private ServletRequest request;
  12.  
  13.    public ServletRequestWrapper(ServletRequest request) {
  14.       if (request == null) {
  15.          throw new IllegalArgumentException("Request cannot be null");
  16.       } else {
  17.          this.request = request;
  18.       }
  19.    }
  20.  
  21.    public ServletRequest getRequest() {
  22.       return this.request;
  23.    }
  24.  
  25.    public void setRequest(ServletRequest request) {
  26.       if (request == null) {
  27.          throw new IllegalArgumentException("Request cannot be null");
  28.       } else {
  29.          this.request = request;
  30.       }
  31.    }
  32.  
  33.    public Object getAttribute(String name) {
  34.       return this.request.getAttribute(name);
  35.    }
  36.  
  37.    public Enumeration getAttributeNames() {
  38.       return this.request.getAttributeNames();
  39.    }
  40.  
  41.    public String getCharacterEncoding() {
  42.       return this.request.getCharacterEncoding();
  43.    }
  44.  
  45.    public void setCharacterEncoding(String enc) throws UnsupportedEncodingException {
  46.       this.request.setCharacterEncoding(enc);
  47.    }
  48.  
  49.    public int getContentLength() {
  50.       return this.request.getContentLength();
  51.    }
  52.  
  53.    public String getContentType() {
  54.       return this.request.getContentType();
  55.    }
  56.  
  57.    public ServletInputStream getInputStream() throws IOException {
  58.       return this.request.getInputStream();
  59.    }
  60.  
  61.    public String getParameter(String name) {
  62.       return this.request.getParameter(name);
  63.    }
  64.  
  65.    public Map getParameterMap() {
  66.       return this.request.getParameterMap();
  67.    }
  68.  
  69.    public Enumeration getParameterNames() {
  70.       return this.request.getParameterNames();
  71.    }
  72.  
  73.    public String[] getParameterValues(String name) {
  74.       return this.request.getParameterValues(name);
  75.    }
  76.  
  77.    public String getProtocol() {
  78.       return this.request.getProtocol();
  79.    }
  80.  
  81.    public String getScheme() {
  82.       return this.request.getScheme();
  83.    }
  84.  
  85.    public String getServerName() {
  86.       return this.request.getServerName();
  87.    }
  88.  
  89.    public int getServerPort() {
  90.       return this.request.getServerPort();
  91.    }
  92.  
  93.    public BufferedReader getReader() throws IOException {
  94.       return this.request.getReader();
  95.    }
  96.  
  97.    public String getRemoteAddr() {
  98.       return this.request.getRemoteAddr();
  99.    }
  100.  
  101.    public String getRemoteHost() {
  102.       return this.request.getRemoteHost();
  103.    }
  104.  
  105.    public void setAttribute(String name, Object o) {
  106.       this.request.setAttribute(name, o);
  107.    }
  108.  
  109.    public void removeAttribute(String name) {
  110.       this.request.removeAttribute(name);
  111.    }
  112.  
  113.    public Locale getLocale() {
  114.       return this.request.getLocale();
  115.    }
  116.  
  117.    public Enumeration getLocales() {
  118.       return this.request.getLocales();
  119.    }
  120.  
  121.    public boolean isSecure() {
  122.       return this.request.isSecure();
  123.    }
  124.  
  125.    public RequestDispatcher getRequestDispatcher(String path) {
  126.       return this.request.getRequestDispatcher(path);
  127.    }
  128.  
  129.    public String getRealPath(String path) {
  130.       return this.request.getRealPath(path);
  131.    }
  132.  
  133.    public int getRemotePort() {
  134.       return this.request.getRemotePort();
  135.    }
  136.  
  137.    public String getLocalName() {
  138.       return this.request.getLocalName();
  139.    }
  140.  
  141.    public String getLocalAddr() {
  142.       return this.request.getLocalAddr();
  143.    }
  144.  
  145.    public int getLocalPort() {
  146.       return this.request.getLocalPort();
  147.    }
  148. }
  149.