44
44
// the proxy is stored in a protected superclass variable named 'in'
47
/** @see java.io.InputStream#read() */
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
48
52
public int read() throws IOException {
52
/** @see java.io.InputStream#read(byte[]) */
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
53
62
public int read(byte[] bts) throws IOException {
54
63
return in.read(bts);
57
/** @see java.io.InputStream#read(byte[], int, int) */
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
58
74
public int read(byte[] bts, int st, int end) throws IOException {
59
75
return in.read(bts, st, end);
62
/** @see java.io.InputStream#skip(long) */
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
63
84
public long skip(long ln) throws IOException {
64
85
return in.skip(ln);
67
/** @see java.io.InputStream#available() */
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
68
93
public int available() throws IOException {
69
94
return in.available();
72
/** @see java.io.InputStream#close() */
98
* Invokes the delegate's <code>close()</code> method.
99
* @throws IOException if an I/O error occurs
73
101
public void close() throws IOException {
77
/** @see java.io.InputStream#mark(int) */
106
* Invokes the delegate's <code>mark(int)</code> method.
107
* @param idx read ahead limit
78
109
public synchronized void mark(int idx) {
82
/** @see java.io.InputStream#reset() */
114
* Invokes the delegate's <code>reset()</code> method.
115
* @throws IOException if an I/O error occurs
83
117
public synchronized void reset() throws IOException {
87
/** @see java.io.InputStream#markSupported() */
122
* Invokes the delegate's <code>markSupported()</code> method.
123
* @return true if mark is supported, otherwise false
88
125
public boolean markSupported() {
89
126
return in.markSupported();