public final class XmlReaderFactory extends Object
Reader
from different sources suitable to read a xml document providing
autodetection of the character set encoding.
The autodetection mechanism follows the recommendations of Section F.1 of the XML specification.
Modifier and Type | Method and Description |
---|---|
static Reader |
create(File file)
Creates a
Reader from the given File with an autodetected character set
encoding. |
static Reader |
create(InputStream inputStream)
Creates a
Reader from the given InputStream with an autodetected character set
encoding. |
public static Reader create(File file)
Reader
from the given File
with an autodetected character set
encoding.file
- the file to create a reader forReader
XmlEncodingException
- if an unsupported encoding is detected or an error occurs while encoding
detectionpublic static Reader create(InputStream inputStream)
Reader
from the given InputStream
with an autodetected character set
encoding.inputStream
- the input stream to create a reader forReader
XmlEncodingException
- if an unsupported encoding is detected or an error occurs while encoding
detectionCopyright © 2014. All rights reserved.