code: public static PrintWriter newPrintWriter(File file, String charset) throws IOException {
          return new GroovyPrintWriter(newWriter(file, charset));
      }
docs: Create a new PrintWriter for this file, using specified
  charset.  If the given charset is "UTF-16BE" or "UTF-16LE" (or an
  equivalent alias), the requisite byte order mark is written to the
  stream before the writer is returned.
  
  @param file    a File
  @param charset the charset
  @return a PrintWriter
  @throws IOException if an IOException occurs.
  @since 1.0