code: public static void close (Writer out)
      {
          if (out != null) {
              try {
                  out.close();
              } catch (IOException ioe) {
                  log.warning("Error closing writer", "writer", out, "cause", ioe);
              }
          }
      }
docs: Convenient close for a Writer. Use in a finally clause and love life.