de.awtools.xml.XMLUtils.java Source code

Java tutorial

Introduction

Here is the source code for de.awtools.xml.XMLUtils.java

Source

/*
 * $Id: XMLUtils.java 2345 2010-07-31 14:30:28Z andrewinkler $
 * ============================================================================
 * Project awtools-xml
 * Copyright (c) 2000-2010 by Andre Winkler. All rights reserved.
 * ============================================================================
 *          GNU LESSER GENERAL PUBLIC LICENSE
 *  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library 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
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */

package de.awtools.xml;

import java.io.IOException;

import org.dom4j.io.XMLWriter;

/**
 * Verschiedene Utilities fr die XML Verarbeitung.
 *
 * @version $LastChangedRevision: 2345 $ $LastChangedDate: 2010-07-31 16:30:28 +0200 (Sa, 31 Jul 2010) $
 * @author by Andre Winkler, $LastChangedBy: andrewinkler $
 */
public final class XMLUtils {

    /**
     * Schliesst sicher einen <code>XMLWriter</code>.
     *
     * @param writer Ein <code>XMLWriter</code>
     */
    public static void close(final XMLWriter writer) {
        if (writer != null) {
            try {
                writer.close();
            } catch (IOException ex) {
                // ignored
            }
        }
    }

}