Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » jasper » compiler » [javadoc | source]
org.apache.jasper.compiler
class: JspReader [javadoc | source]
java.lang.Object
   org.apache.jasper.compiler.JspReader
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.
Constructor:
 public JspReader(JspCompilationContext ctxt,
    String fname,
    String encoding,
    JarFile jarFile,
    ErrorDispatcher err) throws IOException, JasperException, FileNotFoundException 
    Constructor.
    Parameters:
    ctxt - The compilation context
    fname - The file name
    encoding - The file encoding
    jarFile - ?
    err - The error dispatcher
    Throws:
    JasperException - If a Jasper-internal error occurs
    FileNotFoundException - If the JSP file is not found (or is unreadable)
    IOException - If an IO-level error occurs, e.g. reading the file
 public JspReader(JspCompilationContext ctxt,
    String fname,
    String encoding,
    InputStreamReader reader,
    ErrorDispatcher err) throws JasperException, FileNotFoundException 
    Constructor: same as above constructor but with initialized reader to the file given.
Method from org.apache.jasper.compiler.JspReader Summary:
getFile,   getJspCompilationContext,   getResource,   getText,   hasMoreInput,   isSpace,   mark,   matches,   matchesETag,   matchesETagWithoutLessThan,   matchesIgnoreCase,   matchesOptionalSpacesFollowedBy,   nextChar,   parseToken,   peekChar,   pushChar,   reset,   setSingleFile,   skipSpaces,   skipUntil,   skipUntilETag,   skipUntilIgnoreEsc
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jasper.compiler.JspReader Detail:
 String getFile(int fileid) 
    Returns the file at the given position in the list.
 JspCompilationContext getJspCompilationContext() 
 URL getResource(String path) throws MalformedURLException 
    Gets the URL for the given path name.
 String getText(Mark start,
    Mark stop) throws JasperException 
 boolean hasMoreInput() throws JasperException 
    Checks if the current file has more input.
 final boolean isSpace() throws JasperException 
 Mark mark() 
 boolean matches(String string) throws JasperException 
    search the stream for a match to a string
 boolean matchesETag(String tagName) throws JasperException 
 boolean matchesETagWithoutLessThan(String tagName) throws JasperException 
 boolean matchesIgnoreCase(String string) throws JasperException 
 boolean matchesOptionalSpacesFollowedBy(String s) throws JasperException 
    Looks ahead to see if there are optional spaces followed by the given String. If so, true is returned and those spaces and characters are skipped. If not, false is returned and the position is restored to where we were before.
 int nextChar() throws JasperException 
 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.
 int peekChar() throws JasperException 
  void pushChar() 
    Back up the current cursor by one char, assumes current.cursor > 0, and that the char to be pushed back is not '\n'.
  void reset(Mark mark) 
  void setSingleFile(boolean val) 
 int skipSpaces() throws JasperException 
 Mark skipUntil(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.
 Mark skipUntilETag(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.
 Mark skipUntilIgnoreEsc(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.