/** * Closes this output stream and releases any system resources associated with the stream. * <p> * To write the EOF marker without closing the stream, call {@link #eof()} or use an * <a href="https://commons.apache.org/proper/commons-io/">Apache Commons IO</a> <a href= * "https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/output/CloseShieldOutputStream.html" * >CloseShieldOutputStream</a>. * </p> * * @throws IOException * if an I/O error occurs. */ @Override public void close() throws IOException { eof(); flush(); out.close(); }
/** * Closes this output stream and releases any system resources associated with the stream. * <p> * To write the EOF marker without closing the stream, call {@link #eof()} or use an * <a href="https://commons.apache.org/proper/commons-io/">Apache Commons IO</a> <a href= * "https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/output/CloseShieldOutputStream.html" * >CloseShieldOutputStream</a>. * </p> * * @throws IOException * if an I/O error occurs. */ @Override public void close() throws IOException { eof(); flush(); out.close(); }