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 sniff
encodingDefault
- The Java name for the default encoding to apply, UTF-8 if null.
- Throws:
IOException
UnsupportedEncodingException