Class XMLInputStreamDecoder

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Readable

    public class XMLInputStreamDecoder
    extends java.io.Reader
    This class checks the provided input stream for a BOM and if it is able to find it the information this mark carries is interpreted and the encoding is discovered. If no BOM is found a check for a xml declaration is done. If a XML exists then it is checked for an encoding attribute. If that attribute is found its values is taken and the stream is decoded using that encoding. If none of above is found then the InputStream is decoded using the XMLParser2's default encoding. If it is set to null then the system default encoding is used.
    Since:
    7.0
    • Field Summary

      • Fields inherited from class java.io.Reader

        lock
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      int read()
      int read​(char[] cbuf, int off, int len)
      • Methods inherited from class java.io.Reader

        mark, markSupported, nullReader, read, read, ready, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class java.io.Reader
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class java.io.Reader
        Throws:
        java.io.IOException
      • read

        public int read​(char[] cbuf,
                        int off,
                        int len)
                 throws java.io.IOException
        Specified by:
        read in class java.io.Reader
        Throws:
        java.io.IOException