示例#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
     }
   }
 }