List of utility methods to do Stream Close
void | closeSafely(final FileOutputStream output) close Safely if (output != null) { try { output.flush(); output.close(); } catch (final IOException e) { |
void | closeSafely(InputStream is) close Safely try { if (is != null) is.close(); } catch (Throwable e) { |
void | closeSafely(ZipInputStream zis) close Safely if (zis != null) { try { zis.closeEntry(); } catch (IOException e) { try { zis.close(); } catch (IOException e) { ... |
void | closeSecurityConfigurationFileInputStream(FileInputStream fis) Close the security.properties input stream once it's been used. if (fis != null) { try { fis.close(); } catch (Exception ignoreMe) { |
void | closeSilently(final InputStream is) close Silently if (is != null) { try { is.close(); } catch (final IOException ignored) { |
void | closeSilently(InputStream in) close Silently if (null != in) { try { in.close(); } catch (IOException e) { |
void | closeSilently(InputStream inputStream) Closes the given stream. try { if (inputStream != null) { inputStream.close(); } catch (IOException ignore) { |
void | closeSilently(InputStream... inputStreams) close Silently for (InputStream inputStream : inputStreams) { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { |
void | closeSilently(java.util.logging.Logger log, Closeable stream) Closes the Closable and logs the exception if any if (stream != null) { try { stream.close(); } catch (IOException e) { log.log(Level.WARNING, e.getLocalizedMessage(), e.getCause()); |
void | closeSilently(Object obj, Closeable stream) close Silently if (stream == null) { return; try { stream.close(); } catch (IOException e) { Logger.getLogger(obj.getClass().getName()).log(Level.WARNING, "Error occured while closing a stream.", e); ... |