Package org.apache.xmlbeans.impl.common
Class XmlEncodingSniffer
java.lang.Object
org.apache.xmlbeans.impl.common.XmlEncodingSniffer
-
Constructor Summary
ConstructorsConstructorDescriptionXmlEncodingSniffer(Reader reader, String encodingDefault) Sniffs the given XML stream for encoding information. -
Method Summary
Modifier and TypeMethodDescription
-
Constructor Details
-
XmlEncodingSniffer
public XmlEncodingSniffer(Reader reader, String encodingDefault) throws IOException, UnsupportedEncodingException Sniffs the given XML stream for encoding information. After a sniffer is constructed, it can return either a reader (which is a buffered stream wrapper of the original) or a stream (which applies the proper encoding).- Parameters:
reader- The reader to sniffencodingDefault- The Java name for the default encoding to apply, UTF-8 if null.- Throws:
IOExceptionUnsupportedEncodingException
-
-
Method Details
-
getXmlEncoding
-
getJavaEncoding
-
getStream
- Throws:
UnsupportedEncodingException
-
getReader
- Throws:
UnsupportedEncodingException
-