Exemplo n.º 1
0
 /**
  * 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
     }
   }
 }
Exemplo n.º 2
0
 /**
  * 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
     }
   }
 }