cdm/src/main/java/ucar/nc2/util/IO.java
static public void writeToFile(String contents, String fileOutName) throws IOException {
    writeToFile(contents, new File(fileOutName));
  }
static public void writeToFile(String contents, String fileOutName) throws IOException {
    writeToFile(contents, new File(fileOutName));
  }
static public void writeToFile ( String contents , String fileOutName ) throws IOException { writeToFile ( contents , new File ( fileOutName ) ) ; }
Write contents to a file, using UTF-8 encoding.

@param contents    String holding the contents
@param fileOutName write to this file (overwrite if exists)
@throws java.io.IOException on io error
Write contents to a file using UTF - 8 encoding .