/*
 *    GeoTools - OpenSource mapping toolkit
 *    http://geotools.org
 *    (C) 2005-2006, GeoTools Project Managment Committee (PMC)
 *    (C) 2005, Institut de Recherche pour le Développement
 *
 *    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;
 *    version 2.1 of the License.
 *
 *    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.
 */
package org.geotools.io;

// J2SE dependencies
import java.io.IOException;


/**
 * Throws when a stream can't be parsed because some content use an invalid format.
 * This exception typically has a {@link java.text.ParseException} has its cause.
 * It is similar in spirit to {@link java.util.InvalidPropertiesFormatException}.
 *
 * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/metadata/src/main/java/org/geotools/io/ContentFormatException.java $
 * @version $Id: ContentFormatException.java 22443 2006-10-27 20:47:22Z desruisseaux $
 * @author Martin Desruisseaux
 *
 * @since 2.2
 *
 * @see java.util.InvalidPropertiesFormatException
 */
public class ContentFormatException extends IOException {
    /**
     * Serial version for compatibility with different versions.
     */
    private static final long serialVersionUID = 6152194019351374599L;

    /**
     * Constructs a new exception with the specified detail message.
     * The detail message is saved for later retrieval by the {@link #getMessage()} method.
     */
    public ContentFormatException(final String message) {
        super(message);
    }

    /**
     * Constructs a new exception with the specified detail message and cause.
     * The cause is saved for later retrieval by the {@link #getCause()} method.
     */
    public ContentFormatException(final String message, final Throwable cause) {
        super(message);
        initCause(cause);
    }
}
