List of utility methods to do Stream Close
void | closeAll() close All for (FileWriter fw : writers.values()) { try { fw.close(); } catch (IOException e) { e.printStackTrace(); |
void | closeAll() close All closeDribbleFile(); closeDribbleFile2(); closeDebugFile(); closeWarningFile(); |
void | closeAll(Collection Closes given Collection collection of AutoCloseable closeables . closeAll(closeables.toArray(new AutoCloseable[closeables.size()]));
|
void | closeAll(Exception firstEx, Closeable... objects) Same as closeAll(Closeable...) but allows passing an initial exception, when one may have been thrown earlier during a shutdown procedure. for (Closeable c : objects) { if (c == null) { continue; try { c.close(); } catch (Exception e) { if (firstEx == null) { ... |
void | closeAll(Iterable extends Closeable> closeables) close All IOException caught = null; for (Closeable closeable : closeables) { try { if (closeable != null) closeable.close(); } catch (IOException e) { if (caught == null) caught = e; ... |
void | closeAll(T... io) close All for (Closeable temp : io) { try { if (null != temp) { temp.close(); } catch (Exception e) { |
void | closeAllStreamsQuietly(final Closeable... closeables) Closes a list of Closeable objects quietly. The specified list may contain objects with null null values. for (Closeable aCloseable : closeables) {
closeStreamQuietly(aCloseable);
|
void | closeAndRethrow(final Exception e, final Closeable... channels) close And Rethrow closeQuietly(channels); throw new IllegalStateException(e); |
void | closeBufferedFile(BufferedReader reader) close Buffered File try { if (reader != null) reader.close(); } catch (IOException e) { throw new RuntimeException("Cannot close file. " + e.getMessage()); |
void | closeBufferedReader(BufferedReader bufferedReader) close Buffered Reader if (null != bufferedReader) { try { bufferedReader.close(); } catch (IOException e) { |