Class XmlReader

  • All Implemented Interfaces:
    Closeable, AutoCloseable, Readable

    public final class XmlReader
    extends Reader
    This is a simple XmlReader. Its only purpose is to read the xml decl string from the input and apply proper character encoding to all subsequent characters. The xml decl string itself is removed from the output.
    Author:
    Juergen Donnerstag
    • Constructor Detail

      • XmlReader

        public XmlReader​(InputStream inputStream,
                         String defaultEncoding)
                  throws IOException
        Construct.
        Parameters:
        inputStream - The InputStream to read the xml data from
        defaultEncoding - Default character encoding to use when not specified in XML declaration, specify null to use JVM default
        Throws:
        IOException - In case something went wrong while reading the data