List of utility methods to do Stream Close
void | closeFile(FileWriter fw) closeFile Close a text file fw.flush(); fw.close(); |
void | closeFile(final Closeable p_closeable) close File if (p_closeable != null) {
p_closeable.close();
|
void | closeFile(PrintStream ps) close File ps.flush(); ps.close(); |
void | closeFile(RandomAccessFile file) close File if (file == null) return; try { file.close(); } catch (IOException e) { |
void | closeFiles(Closeable... closeables) Silently closes multiple resources. for (Closeable closeable : closeables) {
close(closeable);
|
void | closeFileWriter(BufferedWriter bw) close File Writer try { bw.close(); } catch (IOException e) { e.printStackTrace(); |
void | closeFileWriter(FileWriter file) close File Writer file.flush(); file.close(); |
void | closeGZipStream(GZIPOutputStream outStream) Closes given gzip output stream. if (outStream != null) { try { outStream.finish(); outStream.close(); } catch (IOException e) { |
void | closeHTML(String pageTemplate, PrintStream out) close HTML out.print(pageTemplate.substring(pageTemplate.indexOf(TEMPLATE_CONTENT) + TEMPLATE_CONTENT.length())); |
boolean | closeIgnoreExceptions(Closeable c) Closes a data stream, ignoring any IOExceptions thrown if (c != null) { try { c.close(); } catch (IOException e) { e.printStackTrace(); return false; return true; |