Class DoctypeSupport


  • final class DoctypeSupport
    extends java.lang.Object
    Contains some common code for DoctypeReader and DoctypeInputStream.

    When used with DoctypeInputStream it assumes that the whole DOCTYPE declaration consists of US-ASCII characters.

    • Constructor Detail

      • DoctypeSupport

        DoctypeSupport​(java.lang.String name,
                       java.lang.String systemId,
                       DoctypeSupport.Readable original,
                       boolean characters,
                       java.lang.String encoding)
        Encapsulates a DOCTYPE declaration for the given name and system id.
    • Method Detail

      • read

        int read()
          throws java.io.IOException
        Reads the next character from the declaration.
        Returns:
        -1 if the end of the declaration has been reached.
        Throws:
        java.io.IOException
      • split

        private void split()
                    throws java.io.IOException
        Reads enough of the original Readable to know where to place the declaration. Fills beforeDecl and afterDecl from the data read ahead. Swallows the original DOCTYPE if there is one.
        Throws:
        java.io.IOException
      • readUntilCloseCharIsReached

        private int[] readUntilCloseCharIsReached()
                                           throws java.io.IOException
        Throws:
        java.io.IOException