1 package org.apache.maven.shared.utils.xml;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 import java.io.InputStream;
23
24 /**
25 * The XmlStreamReaderException is thrown by the XmlStreamReader constructors if the charset encoding can not be
26 * determined according to the XML 1.0 specification and RFC 3023.
27 * <p/>
28 * The exception returns the unconsumed InputStream to allow the application to do an alternate processing with the
29 * stream. Note that the original InputStream given to the XmlStreamReader cannot be used as that one has been already
30 * read.
31 * <p/>
32 *
33 * @author Alejandro Abdelnur
34 * @version revision 1.1 taken on 26/06/2007 from Rome (see
35 * https://rome.dev.java.net/source/browse/rome/src/java/com/sun/syndication/io/XmlReaderException.java)
36 */
37 class XmlStreamReaderException
38 extends XmlReaderException
39 {
40 /**
41 * Creates an exception instance if the charset encoding could not be determined.
42 * <p/>
43 * Instances of this exception are thrown by the XmlReader.
44 * <p/>
45 *
46 * @param msg message describing the reason for the exception.
47 * @param bomEnc BOM encoding.
48 * @param xmlGuessEnc XML guess encoding.
49 * @param xmlEnc XML prolog encoding.
50 * @param is the unconsumed InputStream.
51 */
52 public XmlStreamReaderException( String msg, String bomEnc, String xmlGuessEnc, String xmlEnc, InputStream is )
53 {
54 super( msg, bomEnc, xmlGuessEnc, xmlEnc, is );
55 }
56
57 /**
58 * Creates an exception instance if the charset encoding could not be determined.
59 * <p/>
60 * Instances of this exception are thrown by the XmlReader.
61 * <p/>
62 *
63 * @param msg message describing the reason for the exception.
64 * @param ctMime MIME type in the content-type.
65 * @param ctEnc encoding in the content-type.
66 * @param bomEnc BOM encoding.
67 * @param xmlGuessEnc XML guess encoding.
68 * @param xmlEnc XML prolog encoding.
69 * @param is the unconsumed InputStream.
70 */
71 public XmlStreamReaderException( String msg, String ctMime, String ctEnc, String bomEnc, String xmlGuessEnc,
72 String xmlEnc, InputStream is )
73 {
74 super( msg, ctMime, ctEnc, bomEnc, xmlGuessEnc, xmlEnc, is );
75 }
76 }