public class XmlReaderException
extends java.io.IOException
The exception returns the unconsumed InputStream to allow the application to do an alternate processing with the stream. Note that the original InputStream given to the XmlReader cannot be used as that one has been already read.
Constructor and Description |
---|
XmlReaderException(java.lang.String msg,
java.lang.String bomEnc,
java.lang.String xmlGuessEnc,
java.lang.String xmlEnc,
java.io.InputStream is)
Creates an exception instance if the charset encoding could not be determined.
|
XmlReaderException(java.lang.String msg,
java.lang.String ctMime,
java.lang.String ctEnc,
java.lang.String bomEnc,
java.lang.String xmlGuessEnc,
java.lang.String xmlEnc,
java.io.InputStream is)
Creates an exception instance if the charset encoding could not be determined.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBomEncoding()
Returns the BOM encoding found in the InputStream.
|
java.lang.String |
getContentTypeEncoding()
Returns the encoding in the content-type used to attempt determining the encoding.
|
java.lang.String |
getContentTypeMime()
Returns the MIME type in the content-type used to attempt determining the encoding.
|
java.io.InputStream |
getInputStream()
Returns the unconsumed InputStream to allow the application to do an alternate encoding detection on the
InputStream.
|
java.lang.String |
getXmlEncoding()
Returns the encoding found in the XML prolog of the InputStream.
|
java.lang.String |
getXmlGuessEncoding()
Returns the encoding guess based on the first bytes of the InputStream.
|
public XmlReaderException(java.lang.String msg, java.lang.String bomEnc, java.lang.String xmlGuessEnc, java.lang.String xmlEnc, java.io.InputStream is)
Instances of this exception are thrown by the XmlReader.
msg
- message describing the reason for the exception.bomEnc
- BOM encoding.xmlGuessEnc
- XML guess encoding.xmlEnc
- XML prolog encoding.is
- the unconsumed InputStream.public XmlReaderException(java.lang.String msg, java.lang.String ctMime, java.lang.String ctEnc, java.lang.String bomEnc, java.lang.String xmlGuessEnc, java.lang.String xmlEnc, java.io.InputStream is)
Instances of this exception are thrown by the XmlReader.
msg
- message describing the reason for the exception.ctMime
- MIME type in the content-type.ctEnc
- encoding in the content-type.bomEnc
- BOM encoding.xmlGuessEnc
- XML guess encoding.xmlEnc
- XML prolog encoding.is
- the unconsumed InputStream.public java.lang.String getBomEncoding()
public java.lang.String getXmlGuessEncoding()
public java.lang.String getXmlEncoding()
public java.lang.String getContentTypeMime()
public java.lang.String getContentTypeEncoding()
public java.io.InputStream getInputStream()