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 * <p>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.</p> 27 * <p>The exception returns the unconsumed InputStream to allow the application to do an alternate processing with the 28 * stream. Note that the original InputStream given to the XmlStreamReader cannot be used as that one has been already 29 * read.</p> 30 * 31 * @author Alejandro Abdelnur 32 * @version revision 1.1 taken on 26/06/2007 from Rome (see 33 * https://rome.dev.java.net/source/browse/rome/src/java/com/sun/syndication/io/XmlReaderException.java) 34 */ 35 class XmlStreamReaderException 36 extends XmlReaderException 37 { 38 /** 39 * 40 */ 41 private static final long serialVersionUID = 1007947701939672080L; 42 43 /** 44 * Creates an exception instance if the charset encoding could not be determined. 45 * <p/> 46 * Instances of this exception are thrown by the XmlReader. 47 * <p/> 48 * 49 * @param msg message describing the reason for the exception. 50 * @param bomEnc BOM encoding. 51 * @param xmlGuessEnc XML guess encoding. 52 * @param xmlEnc XML prolog encoding. 53 * @param is the unconsumed InputStream. 54 */ 55 XmlStreamReaderException( String msg, String bomEnc, String xmlGuessEnc, String xmlEnc, InputStream is ) 56 { 57 super( msg, bomEnc, xmlGuessEnc, xmlEnc, is ); 58 } 59 60 /** 61 * Creates an exception instance if the charset encoding could not be determined. 62 * <p/> 63 * Instances of this exception are thrown by the XmlReader. 64 * <p/> 65 * 66 * @param msg message describing the reason for the exception. 67 * @param ctMime MIME type in the content-type. 68 * @param ctEnc encoding in the content-type. 69 * @param bomEnc BOM encoding. 70 * @param xmlGuessEnc XML guess encoding. 71 * @param xmlEnc XML prolog encoding. 72 * @param is the unconsumed InputStream. 73 */ 74 XmlStreamReaderException( String msg, String ctMime, String ctEnc, String bomEnc, String xmlGuessEnc, 75 String xmlEnc, InputStream is ) 76 { 77 super( msg, ctMime, ctEnc, bomEnc, xmlGuessEnc, xmlEnc, is ); 78 } 79 }