「Java」ApacheCommons IO 2.6にcloseQuietly() の使い方

ダウンロード
http://commons.apache.org/proper/commons-io/download_io.cgi

利用前

 finally {
       if (in != null) {
          try {
              in.close();
          } catch (IOException e) {
              xxxxxx
          }
       }
       if (out != null) {
          try {
              out.close();
          } catch (IOException e) {
             xxxxxx
          }
       }
 }

利用後

finally {
       IOUtils.closeQuietly(out);
 }

 

Java

Posted by arkgame