public static <T>T withWriter(Path self,String charset,@ClosureParams(value=SimpleType.class,options="java.io.Writer") Closure<T> closure) throws IOException {
  return withWriter(self,charset,false,closure);
}

public static < T > T withWriter ( Path self , String charset , @ ClosureParams ( value = SimpleType . class , options = "java.io.Writer" ) Closure < T > closure ) throws IOException { return withWriter ( self , charset , false , closure ) ; }
creates a new bufferedwriter for this file , passes it to the closure , and ensures the stream is flushed and closed after the closure returns . the writer will use the given charset encoding , but will not write a bom .
