Source code: com/sitemesh/PageParser.java
1 package com.sitemesh;
2
3 import java.io.IOException;
4 import java.io.InputStream;
5 import java.io.Reader;
6 import org.xml.sax.InputSource;
7
8 /**
9 * The PageParser is responsible for parsing the page data into an appropriate
10 * {@link com.sitemesh.Page} object.
11 *
12 * <p>The implementation of this can be switched to parse different kind of data
13 * (<i>e.g.</i> HTML, WML, FOP, images) or for performance enhancements. An
14 * implementation is obtained through the {@link com.sitemesh.Factory} .</p>
15 *
16 * <p>Methods are provided to parse data from a variety of input sources.</p>
17 *
18 * @author <a href="joe@truemesh.com">Joe Walnes</a>
19 * @version $Revision: 1.3 $
20 */
21 public interface PageParser {
22
23 /**
24 * @label builds
25 * @directed
26 */
27 /*#Page lnkPage;*/
28
29 Page parse( InputStream in ) throws IOException;
30
31 Page parse( Reader in ) throws IOException;
32
33 Page parse( InputSource in ) throws IOException;
34
35 Page parse( char[] data ) throws IOException;
36
37 Page parse( byte[] data ) throws IOException;
38
39 }