View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.model.streaming;
8   
9   import java.io.IOException;
10  import java.io.InputStream;
11  
12  public class DelegatingInputStream extends InputStream
13  {
14  
15      private InputStream delegate;
16      
17      public DelegatingInputStream(InputStream delegate)
18      {
19          this.delegate = delegate;
20      }
21  
22      public int available() throws IOException
23      {
24          return delegate.available();
25      }
26  
27      public synchronized void mark(int readlimit)
28      {
29          delegate.mark(readlimit);
30      }
31  
32      public boolean markSupported()
33      {
34          return delegate.markSupported();
35      }
36  
37      public synchronized void reset() throws IOException
38      {
39          delegate.reset();
40      }
41  
42      public long skip(long n) throws IOException
43      {
44          return delegate.skip(n);
45      }
46  
47      public int read() throws IOException
48      {
49          return delegate.read();
50      }
51  
52      public int read(byte b[]) throws IOException
53      {
54          return delegate.read(b);
55      }
56  
57      public int read(byte b[], int off, int len) throws IOException
58      {
59          return delegate.read(b, off, len);
60      }
61  
62      public void close() throws IOException
63      {
64          delegate.close();
65      }
66  
67  }