|
5 | 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
6 | 6 | * (the "License"); you may not use this file except in compliance with |
7 | 7 | * the License. You may obtain a copy of the License at |
8 | | - * |
| 8 | + * |
9 | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
10 | | - * |
| 10 | + * |
11 | 11 | * Unless required by applicable law or agreed to in writing, software |
12 | 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
13 | 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
21 | 21 | import java.io.InputStream; |
22 | 22 |
|
23 | 23 | /** |
24 | | - * A Proxy stream which acts as expected, that is it passes the method |
25 | | - * calls on to the proxied stream and doesn't change which methods are |
26 | | - * being called. |
| 24 | + * A Proxy stream which acts as expected, that is it passes the method |
| 25 | + * calls on to the proxied stream and doesn't change which methods are |
| 26 | + * being called. |
27 | 27 | * <p> |
28 | 28 | * It is an alternative base class to FilterInputStream |
29 | | - * to increase reusability, because FilterInputStream changes the |
| 29 | + * to increase reusability, because FilterInputStream changes the |
30 | 30 | * methods being called, such as read(byte[]) to read(byte[], int, int). |
31 | | - * |
| 31 | + * |
32 | 32 | * @author Stephen Colebourne |
33 | 33 | * @version $Id$ |
34 | 34 | */ |
35 | 35 | public abstract class ProxyInputStream extends FilterInputStream { |
36 | 36 |
|
37 | 37 | /** |
38 | 38 | * Constructs a new ProxyInputStream. |
39 | | - * |
| 39 | + * |
40 | 40 | * @param proxy the InputStream to delegate to |
41 | 41 | */ |
42 | 42 | public ProxyInputStream(InputStream proxy) { |
@@ -78,15 +78,15 @@ public int read(byte[] bts) throws IOException { |
78 | 78 | /** |
79 | 79 | * Invokes the delegate's <code>read(byte[], int, int)</code> method. |
80 | 80 | * @param bts the buffer to read the bytes into |
81 | | - * @param st The start offset |
82 | | - * @param end The number of bytes to read |
| 81 | + * @param off The start offset |
| 82 | + * @param len The number of bytes to read |
83 | 83 | * @return the number of bytes read or -1 if the end of stream |
84 | 84 | * @throws IOException if an I/O error occurs |
85 | 85 | */ |
86 | 86 | @Override |
87 | | - public int read(byte[] bts, int st, int end) throws IOException { |
| 87 | + public int read(byte[] bts, int off, int len) throws IOException { |
88 | 88 | try { |
89 | | - return in.read(bts, st, end); |
| 89 | + return in.read(bts, off, len); |
90 | 90 | } catch (IOException e) { |
91 | 91 | handleIOException(e); |
92 | 92 | return -1; |
@@ -139,11 +139,11 @@ public void close() throws IOException { |
139 | 139 |
|
140 | 140 | /** |
141 | 141 | * Invokes the delegate's <code>mark(int)</code> method. |
142 | | - * @param idx read ahead limit |
| 142 | + * @param readlimit read ahead limit |
143 | 143 | */ |
144 | 144 | @Override |
145 | | - public synchronized void mark(int idx) { |
146 | | - in.mark(idx); |
| 145 | + public synchronized void mark(int readlimit) { |
| 146 | + in.mark(readlimit); |
147 | 147 | } |
148 | 148 |
|
149 | 149 | /** |
@@ -181,5 +181,5 @@ public boolean markSupported() { |
181 | 181 | protected void handleIOException(IOException e) throws IOException { |
182 | 182 | throw e; |
183 | 183 | } |
184 | | - |
| 184 | + |
185 | 185 | } |
0 commit comments