Пример #1
0
 public void closeSession() {
   // #if polish.api.fileconnection
   try {
     session.close();
   } catch (IOException e) {
     logger.error(
         Locale.get(
             "fileexportsession.FailedToCloseConnection") /*Failed to close connection after storing to file*/);
     e.printStackTrace();
   }
   // #endif
 }
Пример #2
0
 /** Safely closes connection and streams */
 public static void close(Connection conn, InputStream is, OutputStream os) {
   if (os != null) {
     try {
       os.close();
     } catch (IOException e) {
     }
   }
   if (is != null) {
     try {
       is.close();
     } catch (IOException e) {
     }
   }
   if (conn != null) {
     try {
       conn.close();
     } catch (IOException e) {
     }
   }
 }
Пример #3
0
 public void close() throws IOException {
   impl.close();
 }