Here you can find the source of saveDotGraph(final String dotGraph, final File outputDirectory)
Parameter | Description |
---|---|
dotGraph | a parameter |
outputDirectory | a parameter |
Parameter | Description |
---|---|
IOException | an exception |
private static File saveDotGraph(final String dotGraph, final File outputDirectory) throws IOException
//package com.java2s; /*//ww w . ja va 2s.c o m * Copyright 2012 jccastrejon * * This file is part of ExSchema. * * ExSchema is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * ExSchema is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with ExSchema. If not, see <http://www.gnu.org/licenses/>. */ import java.io.File; import java.io.FileWriter; import java.io.IOException; public class Main { /** * Save the specified Graphviz's dot file at the top of the specified * project. * * @param dotGraph * @param outputDirectory * @return * @throws IOException */ private static File saveDotGraph(final String dotGraph, final File outputDirectory) throws IOException { File returnValue; FileWriter fileWriter; // Output content returnValue = new File(outputDirectory, "schemas.dot"); fileWriter = new FileWriter(returnValue, false); fileWriter.write(dotGraph); fileWriter.close(); return returnValue; } }