Skip to content

Commit 16f2923

Browse files
author
Niall Pemberton
committed
Fix IO-206 ProxyInputStream: misleading parameter names - thanks to Jeremias Maerki for the patch
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@776062 13f79535-47bb-0310-9956-ffa450edef68
1 parent fe4ff5c commit 16f2923

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

src/java/org/apache/commons/io/input/ProxyInputStream.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
* The ASF licenses this file to You under the Apache License, Version 2.0
66
* (the "License"); you may not use this file except in compliance with
77
* the License. You may obtain a copy of the License at
8-
*
8+
*
99
* http://www.apache.org/licenses/LICENSE-2.0
10-
*
10+
*
1111
* Unless required by applicable law or agreed to in writing, software
1212
* distributed under the License is distributed on an "AS IS" BASIS,
1313
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,22 +21,22 @@
2121
import java.io.InputStream;
2222

2323
/**
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.
2727
* <p>
2828
* It is an alternative base class to FilterInputStream
29-
* to increase reusability, because FilterInputStream changes the
29+
* to increase reusability, because FilterInputStream changes the
3030
* methods being called, such as read(byte[]) to read(byte[], int, int).
31-
*
31+
*
3232
* @author Stephen Colebourne
3333
* @version $Id$
3434
*/
3535
public abstract class ProxyInputStream extends FilterInputStream {
3636

3737
/**
3838
* Constructs a new ProxyInputStream.
39-
*
39+
*
4040
* @param proxy the InputStream to delegate to
4141
*/
4242
public ProxyInputStream(InputStream proxy) {
@@ -78,15 +78,15 @@ public int read(byte[] bts) throws IOException {
7878
/**
7979
* Invokes the delegate's <code>read(byte[], int, int)</code> method.
8080
* @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
8383
* @return the number of bytes read or -1 if the end of stream
8484
* @throws IOException if an I/O error occurs
8585
*/
8686
@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 {
8888
try {
89-
return in.read(bts, st, end);
89+
return in.read(bts, off, len);
9090
} catch (IOException e) {
9191
handleIOException(e);
9292
return -1;
@@ -139,11 +139,11 @@ public void close() throws IOException {
139139

140140
/**
141141
* Invokes the delegate's <code>mark(int)</code> method.
142-
* @param idx read ahead limit
142+
* @param readlimit read ahead limit
143143
*/
144144
@Override
145-
public synchronized void mark(int idx) {
146-
in.mark(idx);
145+
public synchronized void mark(int readlimit) {
146+
in.mark(readlimit);
147147
}
148148

149149
/**
@@ -181,5 +181,5 @@ public boolean markSupported() {
181181
protected void handleIOException(IOException e) throws IOException {
182182
throw e;
183183
}
184-
184+
185185
}

0 commit comments

Comments
 (0)