1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.util.servlet;
16  
17  import java.io.IOException;
18  
19  import javax.servlet.ServletInputStream;
20  
21  /**
22   * <a href="ServletInputStreamWrapper.java.html"><b><i>View Source</i></b></a>
23   *
24   * @author Brian Wing Shun Chan
25   */
26  public class ServletInputStreamWrapper extends ServletInputStream {
27  
28      public ServletInputStreamWrapper(ServletInputStream is) {
29          _is = is;
30      }
31  
32      public int available() throws IOException {
33          return _is.available();
34      }
35  
36      public void close() throws IOException {
37          _is.close();
38      }
39  
40      public void mark(int readlimit) {
41          _is.mark(readlimit);
42      }
43  
44      public boolean markSupported() {
45          return _is.markSupported();
46      }
47  
48      public int read() throws IOException {
49          return _is.read();
50      }
51  
52      public int read(byte[] b) throws IOException {
53          return _is.read(b);
54      }
55  
56      public int read(byte[] b, int off, int len) throws IOException {
57          return _is.read(b, off, len);
58      }
59  
60      public int readLine(byte[] b, int off, int len) throws IOException {
61          return _is.readLine(b, off, len);
62      }
63  
64      public void reset() throws IOException {
65          _is.reset();
66      }
67  
68      public long skip(long n) throws IOException {
69          return _is.skip(n);
70      }
71  
72      private ServletInputStream _is;
73  
74  }