Class HTMLScanner.SpecialScanner

  • All Implemented Interfaces:
    HTMLScanner.Scanner
    Enclosing class:
    HTMLScanner

    public class HTMLScanner.SpecialScanner
    extends java.lang.Object
    implements HTMLScanner.Scanner
    Special scanner used for elements whose content needs to be scanned as plain text, ignoring markup such as elements and entity references. For example: <SCRIPT> and <COMMENT>.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private XMLString charBuffer_
      A string buffer.
      protected java.lang.String fElementName
      Name of element whose content needs to be scanned as text.
      private QName fQName_
      A qualified name.
      protected boolean fStyle
      True if <style> element.
      protected boolean fTextarea
      True if <textarea> element.
      protected boolean fTitle
      True if <title> element.
    • Constructor Summary

      Constructors 
      Constructor Description
      SpecialScanner()  
    • Field Detail

      • fElementName

        protected java.lang.String fElementName
        Name of element whose content needs to be scanned as text.
      • fStyle

        protected boolean fStyle
        True if <style> element.
      • fTextarea

        protected boolean fTextarea
        True if <textarea> element.
      • fTitle

        protected boolean fTitle
        True if <title> element.
      • fQName_

        private final QName fQName_
        A qualified name.
      • charBuffer_

        private final XMLString charBuffer_
        A string buffer.
    • Constructor Detail

      • SpecialScanner

        public SpecialScanner()
    • Method Detail

      • scan

        public boolean scan​(boolean complete)
                     throws java.io.IOException
        Scan.
        Specified by:
        scan in interface HTMLScanner.Scanner
        Parameters:
        complete - True if the scanner should not return until scanning is complete.
        Returns:
        True if additional scanning is required.
        Throws:
        java.io.IOException - Thrown if I/O error occurs.
      • scanCharacters

        protected void scanCharacters​(XMLString buffer,
                                      int delimiter)
                               throws java.io.IOException
        Throws:
        java.io.IOException