src/main/java/org/jboss/util/stream/Streams.java
/**
    * Attempt to close an array of <tt>InputStream</tt>a and/or 
    * <tt>OutputStream</tt>s.
    *
    * @param streams Array of streams to attempt to close.
    * @return        <tt>True</tt> if all streams were closed, or <tt>false</tt>
    *                if an exception was thrown.
    *
    * @throws IllegalArgumentException    Stream is not an <tt>InputStream</tt>
    *                                     or <tt>OuputStream</tt>.  Closing 
    *                                     stops at the last valid stream
    *                                     object in this case.
    */
Attempt to close an array of InputStreama and/or
OutputStreams.

@param streams Array of streams to attempt to close.
@return        True if all streams were closed, or false
if an exception was thrown.


Attempt to close an array of InputStreama and / or OutputStreams . @param streams Array of streams to attempt to close . @return True if all streams were closed or false if an exception was thrown .
public static boolean close(final Object[] streams) {
      boolean success = true;
      for (int i=0; i<streams.length; i++) {
         boolean rv = close(streams[i]);
         if (!rv) success = false;
      }
      return success;
   }
public static boolean close ( final Object [ ] streams ) { boolean success = true ; for ( int i = 0 ; i < streams . length ; i ++ ) { boolean rv = close ( streams [ i ] ) ; if ( ! rv ) success = false ; } return success ; }
Attempt to close an array of <tt>InputStream</tt>a and/or
 <tt>OutputStream</tt>s.
Attempt to close an array of <tt > InputStream< / tt > a and / or <tt > OutputStream< / tt > s .