コード例 #1
0
ファイル: IOUtils.java プロジェクト: hzmmzl/afn
 /**
  * Close an output stream without throwing an exception.
  *
  * @param out the output stream or null
  */
 public static void closeSilently(OutputStream out) {
   if (out != null) {
     try {
       trace("closeSilently", null, out);
       out.close();
     } catch (IOException e) {
       // ignore
     }
   }
 }
コード例 #2
0
ファイル: IOUtils.java プロジェクト: hzmmzl/afn
 /**
  * Close an input stream without throwing an exception.
  *
  * @param in the input stream or null
  */
 public static void closeSilently(InputStream in) {
   if (in != null) {
     try {
       trace("closeSilently", null, in);
       in.close();
     } catch (IOException e) {
       // ignore
     }
   }
 }