2 * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.nemo.tool.sandbox.utils;
14 * Created by hj on 12/11/15.
16 public class FileUtils {
17 private static Logger log = LoggerFactory.getLogger(FileUtils.class);
18 public static void write(String path, String content) {
20 File f = new File(path);
22 if (!f.createNewFile()) {
23 System.out.println("Can not create new file " + path);
26 BufferedWriter output = new BufferedWriter(new FileWriter(f));
27 output.write(content);
29 } catch (Exception e) {