List of utility methods to do Stream Close
OutputStream | close(OutputStream s) Call close on an output stream and ignore any exception. if (s != null) { try { s.close(); } catch (IOException ioe) { return null; |
void | close(PrintStream writer) Closes a server.xml and writes the closing server element.
writer.println("</server>");
writer.close();
|
void | close(Process process) close try { process.waitFor(); } catch (InterruptedException ie) { ie.printStackTrace(); try { process.getInputStream().close(); } catch (IOException ioe) { ... |
void | close(RandomAccessFile randomAccessFile) close if (randomAccessFile != null) { try { randomAccessFile.close(); } catch (IOException e) { throw new RuntimeException(e); |
void | close(Writer out) close try { out.close(); } catch (IOException e) { |
String | close(Writer stream) Close stream with the usual checks. String result = null; if (null != stream) { try { stream.close(); } catch (IOException e) { result = e.getMessage(); return result; |
void | close(ZipFile file) close if (file == null) return; try { file.close(); } catch (IOException e) { |
void | close(ZipFile file) Unconditionally close a ZipFile. if (file != null) { try { file.close(); } catch (IOException ignore) { |
void | close(ZipFile file) A special version of close() for ZipFiles, which don't implement Closeable. if (file != null)
file.close();
|
void | close(ZipFile zipFile) Closes zip file safely. if (zipFile != null) { try { zipFile.close(); } catch (IOException ioex) { |