de.intarsys.tools.reader
Class DirectTagReader
java.lang.Object
java.io.Reader
java.io.FilterReader
de.intarsys.tools.reader.DirectTagReader
- All Implemented Interfaces:
- Closeable, Readable
- Direct Known Subclasses:
- EntityDecoder
public class DirectTagReader
- extends FilterReader
A Reader
that is aware of embedded tags. An example is processing a
JSP page, where java is embededd using "<%...%>". After recognizing such a
tag, the associated IDirectTagHandler
is informed to handle the tag.
After handling, the result of the IDirectTagHandler
is streamd as a
replacement for the tag itself. After streaming the processed tag content,
reading the input continues as normal.
ESCAPE_CHARACTER
public static final char ESCAPE_CHARACTER
- See Also:
- Constant Field Values
DefaultEscapeMap
public static final Map DefaultEscapeMap
DirectTagReader
public DirectTagReader(Reader pReader,
IDirectTagHandler handler,
Object context)
DirectTagReader
public DirectTagReader(Reader pReader,
IDirectTagHandler handler,
Object context,
boolean escape)
read
public int read()
throws IOException
- Read a character until we encounter a tag.
- Overrides:
read
in class FilterReader
- Throws:
IOException
- See Also:
Reader.read()
read
public int read(char[] cbuf,
int off,
int len)
throws IOException
- Overrides:
read
in class FilterReader
- Throws:
IOException
setEndTag
public void setEndTag(String tag)
setStartTag
public void setStartTag(String tag)
Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.