You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ni...@apache.org on 2009/05/18 21:38:15 UTC

svn commit: r776062 - /commons/proper/io/trunk/src/java/org/apache/commons/io/input/ProxyInputStream.java

Author: niallp
Date: Mon May 18 19:38:15 2009
New Revision: 776062

URL: http://svn.apache.org/viewvc?rev=776062&view=rev
Log:
Fix IO-206 ProxyInputStream: misleading parameter names - thanks to Jeremias Maerki for the patch

Modified:
    commons/proper/io/trunk/src/java/org/apache/commons/io/input/ProxyInputStream.java

Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/input/ProxyInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/input/ProxyInputStream.java?rev=776062&r1=776061&r2=776062&view=diff
==============================================================================
--- commons/proper/io/trunk/src/java/org/apache/commons/io/input/ProxyInputStream.java (original)
+++ commons/proper/io/trunk/src/java/org/apache/commons/io/input/ProxyInputStream.java Mon May 18 19:38:15 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,14 +21,14 @@
 import java.io.InputStream;
 
 /**
- * A Proxy stream which acts as expected, that is it passes the method 
- * calls on to the proxied stream and doesn't change which methods are 
- * being called. 
+ * A Proxy stream which acts as expected, that is it passes the method
+ * calls on to the proxied stream and doesn't change which methods are
+ * being called.
  * <p>
  * It is an alternative base class to FilterInputStream
- * to increase reusability, because FilterInputStream changes the 
+ * to increase reusability, because FilterInputStream changes the
  * methods being called, such as read(byte[]) to read(byte[], int, int).
- * 
+ *
  * @author Stephen Colebourne
  * @version $Id$
  */
@@ -36,7 +36,7 @@
 
     /**
      * Constructs a new ProxyInputStream.
-     * 
+     *
      * @param proxy  the InputStream to delegate to
      */
     public ProxyInputStream(InputStream proxy) {
@@ -78,15 +78,15 @@
     /**
      * Invokes the delegate's <code>read(byte[], int, int)</code> method.
      * @param bts the buffer to read the bytes into
-     * @param st The start offset
-     * @param end The number of bytes to read
+     * @param off The start offset
+     * @param len The number of bytes to read
      * @return the number of bytes read or -1 if the end of stream
      * @throws IOException if an I/O error occurs
      */
     @Override
-    public int read(byte[] bts, int st, int end) throws IOException {
+    public int read(byte[] bts, int off, int len) throws IOException {
         try {
-            return in.read(bts, st, end);
+            return in.read(bts, off, len);
         } catch (IOException e) {
             handleIOException(e);
             return -1;
@@ -139,11 +139,11 @@
 
     /**
      * Invokes the delegate's <code>mark(int)</code> method.
-     * @param idx read ahead limit
+     * @param readlimit read ahead limit
      */
     @Override
-    public synchronized void mark(int idx) {
-        in.mark(idx);
+    public synchronized void mark(int readlimit) {
+        in.mark(readlimit);
     }
 
     /**
@@ -181,5 +181,5 @@
     protected void handleIOException(IOException e) throws IOException {
         throw e;
     }
- 
+
 }