org.apache.jasper.compiler
Class JspReader
java.lang.Object
|
+--org.apache.jasper.compiler.JspReader
- public class JspReader
- extends java.lang.Object
JspReader is an input buffer for the JSP parser. It should allow
unlimited lookahead and pushback. It also has a bunch of parsing
utility methods for understanding htmlesque thingies.
- Author:
- Anil K. Vijendran, Anselm Baird-Smith, Harish Prabandham, Rajiv Mordani, Mandar Raje, Danno Ferrin
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
current
protected Mark current
JspReader
protected JspReader(JspCompilationContext ctx,
java.lang.String file,
java.lang.String encoding,
java.io.InputStreamReader reader,
ErrorDispatcher err)
throws JasperException,
java.io.FileNotFoundException
getFile
public java.lang.String getFile(int fileid)
registerSourceFile
protected int registerSourceFile(java.lang.String file)
- Register a new source file.
This method is used to implement file inclusion. Each included file
gets a uniq identifier (which is the index in the array of source files).
- Returns:
- The index of the now registered file.
unregisterSourceFile
protected int unregisterSourceFile(java.lang.String file)
- Unregister the source file.
This method is used to implement file inclusion. Each included file
gets a uniq identifier (which is the index in the array of source
files).
- Returns:
- The index of the now registered file.
popFile
public boolean popFile()
throws JasperException
hasMoreInput
public boolean hasMoreInput()
throws JasperException
nextChar
public int nextChar()
throws JasperException
peekChar
public int peekChar()
mark
public Mark mark()
reset
public void reset(Mark mark)
matchesIgnoreCase
public boolean matchesIgnoreCase(java.lang.String string)
throws JasperException
matches
public boolean matches(java.lang.String string)
throws JasperException
- search the stream for a match to a string
- Parameters:
string
- The string to match- Returns:
- true is one is found, the current position
in stream is positioned after the search string,
false otherwise, position in stream unchanged.
matchesETag
public boolean matchesETag(java.lang.String tagName)
throws JasperException
advance
public void advance(int n)
throws JasperException
skipSpaces
public int skipSpaces()
throws JasperException
skipUntil
public Mark skipUntil(java.lang.String limit)
throws JasperException
- Skip until the given string is matched in the stream.
When returned, the context is positioned past the end of the match.
- Parameters:
limit
- The String to match.- Returns:
- A non-null
Mark
instance (positioned immediately
before the search string) if found, null
otherwise.
skipUntilIgnoreEsc
public Mark skipUntilIgnoreEsc(java.lang.String limit)
throws JasperException
- Skip until the given string is matched in the stream, but ignoring
chars initially escaped by a '\'.
When returned, the context is positioned past the end of the match.
- Parameters:
limit
- The String to match.- Returns:
- A non-null
Mark
instance (positioned immediately
before the search string) if found, null
otherwise.
skipUntilETag
public Mark skipUntilETag(java.lang.String tag)
throws JasperException
- Skip until the given end tag is matched in the stream.
When returned, the context is positioned past the end of the tag.
- Parameters:
tag
- The name of the tag whose ETag () to match.- Returns:
- A non-null
Mark
instance (positioned immediately
before the ETag) if found, null otherwise.
parseToken
public java.lang.String parseToken(boolean quoted)
throws JasperException
- Parse a space delimited token.
If quoted the token will consume all characters up to a matching quote,
otherwise, it consumes up to the first delimiter character.
- Parameters:
quoted
- If true accept quoted strings.
setSingleFile
public void setSingleFile(boolean val)
Copyright © 2000 Apache Software Foundation. All Rights Reserved.