List of utility methods to do Stream Close
void | closeQuietly(InputStream is) Closes the stream, if possible, suppressing any exception. if (is != null) { try { is.close(); } catch (Exception e) { |
void | closeQuietly(InputStream is) close Quietly try { if (is != null) { is.close(); } catch (Exception e) { |
void | closeQuietly(InputStream is) Closes the given input stream without throwing an exception. if (null != is) { try { is.close(); } catch (IOException e) { |
void | closeQuietly(InputStream stream) Quietly close a given stream, suppressing exceptions. if (stream == null) { return; try { stream.close(); } catch (IOException e) { |
void | closeQuietly(InputStream x) Unconditionally close an InputStream .
if (x == null) { return; try { x.close(); } catch (IOException e) { interruptIfNecessary(e); |
void | closeQuietly(java.io.Closeable writer) close Quietly try { if (writer != null) { writer.close(); } catch (IOException ioe) { |
void | closeQuietly(Object input) close Quietly if (input == null || !(input instanceof Closeable)) { return; try { ((Closeable) input).close(); } catch (IOException ioe) { |
void | closeQuietly(Object obj) close Quietly if (obj != null) { if (obj instanceof Closeable) { try { ((Closeable) obj).close(); } catch (Exception e) { } else { throw new ClassCastException("Not a closable Object"); ... |
void | closeQuietly(Object object) If the specified object is an InputStream or OutputStream, then it is closed and any exceptions are ignored. try { if (object instanceof InputStream) { ((InputStream) object).close(); } else if (object instanceof OutputStream) { ((OutputStream) object).close(); } catch (Exception e) { |
void | closeQuietly(Object object) close Quietly if (object != null) { try { if (object instanceof Closeable) { ((Closeable) object).close(); } else if (object instanceof InputStream) { ((InputStream) object).close(); } else if (object instanceof OutputStream) { ((OutputStream) object).close(); ... |