This won't be used anyway, now with arm, but the more general way, you
method his more useful in this variation. The exception are oddball
classes like Sockets and all the SQL classes, images (dispose()) that
are not closeable, even if the acquire native resources.


   static List<IOException> close(Closeable ... s) {
       if (s != null) {
           List <IOException> exceptions = new ArrayList();
           for(Closeable s1 : s){
           try { s.close(); }
           catch (IOException e) { exceptions.add(e); }
           }
           return exceptions;
       }
       return Collections.emptyList();
   }

Reply via email to