1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.kernel.io.unsync;
16  
17  import java.io.IOException;
18  import java.io.InputStream;
19  
20  /**
21   * <a href="UnsyncFilterInputStream.java.html"><b><i>View Source</i></b></a>
22   *
23   * <p>
24   * See http://issues.liferay.com/browse/LPS-6648.
25   * </p>
26   *
27   * @author Shuyang Zhou
28   */
29  public class UnsyncFilterInputStream extends InputStream {
30  
31      public UnsyncFilterInputStream(InputStream inputStream) {
32          this.inputStream = inputStream;
33      }
34  
35      public int available() throws IOException {
36          return inputStream.available();
37      }
38  
39      public void close() throws IOException {
40          inputStream.close();
41      }
42  
43      public void mark(int readLimit) {
44          inputStream.mark(readLimit);
45      }
46  
47      public boolean markSupported() {
48          return inputStream.markSupported();
49      }
50  
51      public int read() throws IOException {
52          return inputStream.read();
53      }
54  
55      public int read(byte[] byteArray) throws IOException {
56          return inputStream.read(byteArray);
57      }
58  
59      public int read(byte[] byteArray, int offset, int length)
60          throws IOException {
61  
62          return inputStream.read(byteArray, offset, length);
63      }
64  
65      public void reset() throws IOException {
66          inputStream.reset();
67      }
68  
69      public long skip(long skip) throws IOException {
70          return inputStream.skip(skip);
71      }
72  
73      protected InputStream inputStream;
74  
75  }