commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r1003652 - /commons/proper/io/trunk/src/java/org/apache/commons/io/IOUtils.java
Date Fri, 01 Oct 2010 21:13:17 GMT
Author: niallp
Date: Fri Oct  1 21:13:16 2010
New Revision: 1003652

URL: http://svn.apache.org/viewvc?rev=1003652&view=rev
Log:
IO-224 Remove IOUtils.closeQuietly(Channel) added as part of IO-155 - redundant now there
is IOUtils.closeQuietly(Closeable) 

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

Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/IOUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/IOUtils.java?rev=1003652&r1=1003651&r2=1003652&view=diff
==============================================================================
--- commons/proper/io/trunk/src/java/org/apache/commons/io/IOUtils.java (original)
+++ commons/proper/io/trunk/src/java/org/apache/commons/io/IOUtils.java Fri Oct  1 21:13:16
2010
@@ -172,35 +172,6 @@ public class IOUtils {
     }
 
     /**
-     * Unconditionally close a <code>Channel</code>.
-     * <p>
-     * Equivalent to {@link Channel#close()}, except any exceptions will be ignored.
-     * This is typically used in finally blocks.
-     * <p>
-     * Example code:
-     * <pre>
-     *   ByteBuffer buffer = ByteBuffer.allocate(1024);
-     *   FileChannel channel = null;
-     *   try {
-     *       FileInputStream in = new FileInputStream("foo.txt");
-     *       channel = in.getChannel();
-     *       channel.read(buffer);
-     *       channel.close(); //close errors are handled
-     *   } catch (Exception e) {
-     *       // error handling
-     *   } finally {
-     *       IOUtils.closeQuietly(channel);
-     *   }
-     * </pre>
-     *
-     * @param channel the Channel to close, may be null or already closed
-     * @since Commons IO 2.0
-     */
-    public static void closeQuietly(Channel channel) {
-        closeQuietly((Closeable)channel);
-    }
-
-    /**
      * Unconditionally close a <code>Writer</code>.
      * <p>
      * Equivalent to {@link Writer#close()}, except any exceptions will be ignored.



Mime
View raw message