KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ccil > cowan > tagsoup > Scanner


1 // This file is part of TagSoup.
2
//
3
// This program is free software; you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation; either version 2 of the License, or
6
// (at your option) any later version. You may also distribute
7
// and/or modify it under version 2.1 of the Academic Free License.
8
//
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
//
13
//
14
// Scanner
15

16 package org.ccil.cowan.tagsoup;
17 import java.io.IOException JavaDoc;
18 import java.io.Reader JavaDoc;
19 import org.xml.sax.SAXException JavaDoc;
20
21 /**
22 An interface allowing Parser to invoke scanners.
23 **/

24
25 public interface Scanner {
26
27     /**
28     Invoke a scanner.
29     @param r A source of characters to scan
30     @param h A ScanHandler to report events to
31     **/

32
33     public void scan(Reader JavaDoc r, ScanHandler h) throws IOException JavaDoc, SAXException JavaDoc;
34
35     /**
36     Reset the embedded locator.
37     @param publicid The publicid of the source
38     @param systemid The systemid of the source
39     **/

40
41     public void resetDocumentLocator(String JavaDoc publicid, String JavaDoc systemid);
42
43     /**
44     Signal to the scanner to start CDATA content mode.
45     **/

46
47     public void startCDATA();
48
49     }
50
Popular Tags