List of utility methods to do Stream Close
void | closeNoExceptions(Reader reader) close No Exceptions if (null == reader) return; try { reader.close(); } catch (IOException e) { ; |
void | closeNoThrow(InputStream s) close No Throw try { if (s != null) { s.close(); } catch (Exception ex) { |
void | closeOutput(OutputStream stream) Close the given output stream. if (stream == System.out) { return; try { stream.close(); } catch (IOException ex) { throw new RuntimeException("trouble closing stream: " + stream, ex); |
void | closeOutputFile(Writer pWriter) closes the outputfile if (null != pWriter) { try { pWriter.flush(); } catch (IOException e) { e.printStackTrace(); try { pWriter.close(); ... |
void | closeOutputStream(OutputStream out) Closes and flushes the given OutputStream. if (out != null) { try { out.flush(); } catch (Exception ex) { ex.printStackTrace(); try { out.close(); ... |
void | closeOutputStream(OutputStream out, boolean flush) Close the given output stream if not null try { if (out != null) { if (flush) out.flush(); out.close(); } catch (IOException e) { |
void | closeOutputStream(OutputStream outputStream) close Output Stream if (outputStream != null) {
outputStream.close();
|
void | closePermanentOutputWriter() close Permanent Output Writer if (outputWriter != null) try { outputWriter.close(); } catch (IOException e) { e.printStackTrace(); |
void | closePort() close Port isOpen = false; try { p.getErrorStream().close(); p.getInputStream().close(); p.getOutputStream().close(); } catch (IOException e) { e.printStackTrace(); p.destroy(); |
void | closePrintWriter(PrintWriter fileOutputStream) close Print Writer if (null != fileOutputStream) {
fileOutputStream.flush();
fileOutputStream.close();
|