~ubuntu-branches/ubuntu/karmic/commons-io/karmic

« back to all changes in this revision

Viewing changes to src/java/org/apache/commons/io/input/ProxyInputStream.java

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2008-02-21 13:26:43 UTC
  • mfrom: (1.1.3 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080221132643-p4c8f8lhb9rnqnlo
Tags: 1.4-1
* New upstream release
* Bump Standards-Version to 3.7.3
* Bump up debhelper compat to 6
* Replace XS-Vcs headers with Vcs
* debian/patches:
  - remove 01_no_ext_links.dpatch - not required
  - remove 02_no_mkdir_in_homedir.dpatch - not required
* Remove dpatch from Build-Depends
* Update debian/rules and debian/libcommons-io-java-doc.install
  with new target dirs
* debian/copyright: add copyright notice

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 * methods being called, such as read(byte[]) to read(byte[], int, int).
31
31
 * 
32
32
 * @author Stephen Colebourne
33
 
 * @version $Id: ProxyInputStream.java 471628 2006-11-06 04:06:45Z bayard $
 
33
 * @version $Id: ProxyInputStream.java 610010 2008-01-08 14:50:59Z niallp $
34
34
 */
35
35
public abstract class ProxyInputStream extends FilterInputStream {
36
36
 
44
44
        // the proxy is stored in a protected superclass variable named 'in'
45
45
    }
46
46
 
47
 
    /** @see java.io.InputStream#read() */
 
47
    /**
 
48
     * Invokes the delegate's <code>read()</code> method.
 
49
     * @return the byte read or -1 if the end of stream
 
50
     * @throws IOException if an I/O error occurs
 
51
     */
48
52
    public int read() throws IOException {
49
53
        return in.read();
50
54
    }
51
55
 
52
 
    /** @see java.io.InputStream#read(byte[]) */
 
56
    /**
 
57
     * Invokes the delegate's <code>read(byte[])</code> method.
 
58
     * @param bts the buffer to read the bytes into
 
59
     * @return the number of bytes read or -1 if the end of stream
 
60
     * @throws IOException if an I/O error occurs
 
61
     */
53
62
    public int read(byte[] bts) throws IOException {
54
63
        return in.read(bts);
55
64
    }
56
65
 
57
 
    /** @see java.io.InputStream#read(byte[], int, int) */
 
66
    /**
 
67
     * Invokes the delegate's <code>read(byte[], int, int)</code> method.
 
68
     * @param bts the buffer to read the bytes into
 
69
     * @param st The start offset
 
70
     * @param end The number of bytes to read
 
71
     * @return the number of bytes read or -1 if the end of stream
 
72
     * @throws IOException if an I/O error occurs
 
73
     */
58
74
    public int read(byte[] bts, int st, int end) throws IOException {
59
75
        return in.read(bts, st, end);
60
76
    }
61
77
 
62
 
    /** @see java.io.InputStream#skip(long) */
 
78
    /**
 
79
     * Invokes the delegate's <code>skip(long)</code> method.
 
80
     * @param ln the number of bytes to skip
 
81
     * @return the number of bytes to skipped or -1 if the end of stream
 
82
     * @throws IOException if an I/O error occurs
 
83
     */
63
84
    public long skip(long ln) throws IOException {
64
85
        return in.skip(ln);
65
86
    }
66
87
 
67
 
    /** @see java.io.InputStream#available() */
 
88
    /**
 
89
     * Invokes the delegate's <code>available()</code> method.
 
90
     * @return the number of available bytes
 
91
     * @throws IOException if an I/O error occurs
 
92
     */
68
93
    public int available() throws IOException {
69
94
        return in.available();
70
95
    }
71
96
 
72
 
    /** @see java.io.InputStream#close() */
 
97
    /**
 
98
     * Invokes the delegate's <code>close()</code> method.
 
99
     * @throws IOException if an I/O error occurs
 
100
     */
73
101
    public void close() throws IOException {
74
102
        in.close();
75
103
    }
76
104
 
77
 
    /** @see java.io.InputStream#mark(int) */
 
105
    /**
 
106
     * Invokes the delegate's <code>mark(int)</code> method.
 
107
     * @param idx read ahead limit
 
108
     */
78
109
    public synchronized void mark(int idx) {
79
110
        in.mark(idx);
80
111
    }
81
112
 
82
 
    /** @see java.io.InputStream#reset() */
 
113
    /**
 
114
     * Invokes the delegate's <code>reset()</code> method.
 
115
     * @throws IOException if an I/O error occurs
 
116
     */
83
117
    public synchronized void reset() throws IOException {
84
118
        in.reset();
85
119
    }
86
120
 
87
 
    /** @see java.io.InputStream#markSupported() */
 
121
    /**
 
122
     * Invokes the delegate's <code>markSupported()</code> method.
 
123
     * @return true if mark is supported, otherwise false
 
124
     */
88
125
    public boolean markSupported() {
89
126
        return in.markSupported();
90
127
    }