01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2005-2006, GeoTools Project Managment Committee (PMC)
05: * (C) 2005, Institut de Recherche pour le Développement
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation;
10: * version 2.1 of the License.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: */
17: package org.geotools.io;
18:
19: // J2SE dependencies
20: import java.io.IOException;
21:
22: /**
23: * Throws when a stream can't be parsed because some content use an invalid format.
24: * This exception typically has a {@link java.text.ParseException} has its cause.
25: * It is similar in spirit to {@link java.util.InvalidPropertiesFormatException}.
26: *
27: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/metadata/src/main/java/org/geotools/io/ContentFormatException.java $
28: * @version $Id: ContentFormatException.java 22443 2006-10-27 20:47:22Z desruisseaux $
29: * @author Martin Desruisseaux
30: *
31: * @since 2.2
32: *
33: * @see java.util.InvalidPropertiesFormatException
34: */
35: public class ContentFormatException extends IOException {
36: /**
37: * Serial version for compatibility with different versions.
38: */
39: private static final long serialVersionUID = 6152194019351374599L;
40:
41: /**
42: * Constructs a new exception with the specified detail message.
43: * The detail message is saved for later retrieval by the {@link #getMessage()} method.
44: */
45: public ContentFormatException(final String message) {
46: super (message);
47: }
48:
49: /**
50: * Constructs a new exception with the specified detail message and cause.
51: * The cause is saved for later retrieval by the {@link #getCause()} method.
52: */
53: public ContentFormatException(final String message,
54: final Throwable cause) {
55: super(message);
56: initCause(cause);
57: }
58: }
|