Here you can find the source of saveModelInFile(final String model, final String filename)
Parameter | Description |
---|---|
model | a parameter |
Parameter | Description |
---|---|
Exception | an exception |
static public File saveModelInFile(final String model, final String filename) throws Exception
//package com.java2s; //License from project: Open Source License import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; public class Main { /**/*from w w w .j a va 2 s . c om*/ * Creates and returns a file that contains the argument model as content. * * @param model * @return * @throws Exception */ static public File saveModelInFile(final String model, final String filename) throws Exception { final File f = new File(filename); final BufferedWriter bw = new BufferedWriter(new FileWriter(f)); bw.write(model); bw.close(); return f; } }