initial commit
[scannotation] / src / main / java / org / scannotation / classpath / InputStreamWrapper.java
1 package org.scannotation.classpath;
2
3 import java.io.InputStream;
4 import java.io.IOException;
5
6 /**
7  * Delegate to everything but close().  This object will not close the stream
8  *
9  * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
10  * @version $Revision: 1 $
11  */
12 public class InputStreamWrapper extends InputStream
13 {
14    private InputStream delegate;
15
16    public InputStreamWrapper(InputStream delegate)
17    {
18       this.delegate = delegate;
19    }
20
21    public int read()
22            throws IOException
23    {
24       return delegate.read();
25    }
26
27    public int read(byte[] bytes)
28            throws IOException
29    {
30       return delegate.read(bytes);
31    }
32
33    public int read(byte[] bytes, int i, int i1)
34            throws IOException
35    {
36       return delegate.read(bytes, i, i1);
37    }
38
39    public long skip(long l)
40            throws IOException
41    {
42       return delegate.skip(l);
43    }
44
45    public int available()
46            throws IOException
47    {
48       return delegate.available();
49    }
50
51    public void close()
52            throws IOException
53    {
54       // ignored
55    }
56
57    public void mark(int i)
58    {
59       delegate.mark(i);
60    }
61
62    public void reset()
63            throws IOException
64    {
65       delegate.reset();
66    }
67
68    public boolean markSupported()
69    {
70       return delegate.markSupported();
71    }
72 }