List of utility methods to do Stream Close
void | closeIgnoreExceptions(Closeable stream) Closes the given stream and ignores all IOExceptions thrown by the close operation. if (stream == null) return; try { stream.close(); } catch (InterruptedIOException e) { Thread.currentThread().interrupt(); } catch (IOException e) { |
void | closeIgnoreIOEx(ByteArrayOutputStream baos) close Ignore IO Ex if (null == baos) return; try { baos.close(); } catch (IOException ex) { |
void | closeIgnoringException(final Closeable closeable) Closes java.io.Closeable instance ignoring IOException. if (closeable == null) return; try { closeable.close(); } catch (IOException ignored) { |
void | closeIgnoringExceptions(Closeable c) Provides an implementation of closing a file for use in a finally block so you can correctly close a file without even more exception handling stuff. if (c != null) { try { c.close(); } catch (IOException ioe) { |
void | closeIgnoringExceptions(Closeable c) Helper method use to close a Closeable ignoring eventual exception try { if (c != null) { c.close(); } catch (Throwable _) { |
void | closeImage() close Image stream.close(); |
void | closeIncludeGuard(String name, PrintWriter writer) Typical C include guard footer from fully qualified like Strings final String macroName = name.replace(".", "_").toUpperCase(); writer.println(); writer.println("#endif /* " + macroName + " */"); writer.println(); |
void | closeInput(InputStream src) close Input src.close(); |
void | closeInputStream(DataInputStream di) Closes the given input stream. try { if (di != null) { di.close(); } catch (IOException io) { System.out.println("Couldn't close Input Stream " + di); |
InputStream | closeInputStream(InputStream in) Closes an input stream. if (in != null) { try { in.close(); in = null; } catch (IOException e) { System.err.println("Cobertura: Error closing input stream."); e.printStackTrace(); return in; |