class JspReader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private JspCompilationContext |
context |
private Mark |
current |
private int |
currFileId |
private ErrorDispatcher |
err |
private static java.util.logging.Logger |
log |
private java.lang.String |
master |
private boolean |
singleFile |
private int |
size |
private java.util.ArrayList<java.lang.String> |
sourceFiles |
Constructor and Description |
---|
JspReader(JspCompilationContext ctxt,
java.lang.String fname,
java.lang.String encoding,
java.io.InputStreamReader reader,
ErrorDispatcher err) |
JspReader(JspCompilationContext ctxt,
java.lang.String fname,
java.lang.String encoding,
java.util.jar.JarFile jarFile,
ErrorDispatcher err) |
Modifier and Type | Method and Description |
---|---|
(package private) java.lang.String |
getFile(int fileid) |
(package private) JspCompilationContext |
getJspCompilationContext() |
(package private) java.net.URL |
getResource(java.lang.String path)
Gets the URL for the given path name.
|
(package private) java.lang.String |
getText(Mark start,
Mark stop) |
(package private) boolean |
hasMoreInput() |
private boolean |
isDelimiter()
Parse utils - Is current character a token delimiter ?
Delimiters are currently defined to be =, >, <, ", and ' or any
any space character as defined by
isSpace . |
(package private) boolean |
isSpace() |
(package private) Mark |
mark() |
(package private) boolean |
matches(java.lang.String string)
search the stream for a match to a string
|
(package private) boolean |
matchesETag(java.lang.String tagName) |
(package private) boolean |
matchesETagWithoutLessThan(java.lang.String tagName) |
(package private) boolean |
matchesIgnoreCase(java.lang.String string) |
(package private) boolean |
matchesOptionalSpacesFollowedBy(java.lang.String s)
Looks ahead to see if there are optional spaces followed by
the given String.
|
(package private) int |
nextChar() |
(package private) java.lang.String |
parseToken(boolean quoted)
Parse a space delimited token.
|
(package private) int |
peekChar() |
private boolean |
popFile()
Pop a file from the file stack.
|
(package private) 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'.
|
private void |
pushFile(java.lang.String file,
java.lang.String encoding,
java.io.InputStreamReader reader)
Push a file (and its associated Stream) on the file stack.
|
private int |
registerSourceFile(java.lang.String file)
Register a new source file.
|
(package private) void |
reset(Mark mark) |
(package private) void |
setSingleFile(boolean val) |
(package private) int |
skipSpaces() |
(package private) Mark |
skipUntil(java.lang.String limit)
Skip until the given string is matched in the stream.
|
(package private) Mark |
skipUntilETag(java.lang.String tag)
Skip until the given end tag is matched in the stream.
|
(package private) Mark |
skipUntilIgnoreEsc(java.lang.String limit)
Skip until the given string is matched in the stream, but ignoring
chars initially escaped by a '\'.
|
private int |
unregisterSourceFile(java.lang.String file)
Unregister the source file.
|
private static java.util.logging.Logger log
private Mark current
private java.lang.String master
private java.util.ArrayList<java.lang.String> sourceFiles
private int currFileId
private int size
private JspCompilationContext context
private ErrorDispatcher err
private boolean singleFile
public JspReader(JspCompilationContext ctxt, java.lang.String fname, java.lang.String encoding, java.util.jar.JarFile jarFile, ErrorDispatcher err) throws JasperException, java.io.FileNotFoundException, java.io.IOException
JasperException
java.io.FileNotFoundException
java.io.IOException
public JspReader(JspCompilationContext ctxt, java.lang.String fname, java.lang.String encoding, java.io.InputStreamReader reader, ErrorDispatcher err) throws JasperException, java.io.FileNotFoundException
JasperException
java.io.FileNotFoundException
JspCompilationContext getJspCompilationContext()
java.lang.String getFile(int fileid)
boolean hasMoreInput() throws JasperException
JasperException
int nextChar() throws JasperException
JasperException
void pushChar()
java.lang.String getText(Mark start, Mark stop) throws JasperException
JasperException
int peekChar() throws JasperException
JasperException
Mark mark()
void reset(Mark mark)
boolean matchesIgnoreCase(java.lang.String string) throws JasperException
JasperException
boolean matches(java.lang.String string) throws JasperException
string
- The string to matchJasperException
boolean matchesETag(java.lang.String tagName) throws JasperException
JasperException
boolean matchesETagWithoutLessThan(java.lang.String tagName) throws JasperException
JasperException
boolean matchesOptionalSpacesFollowedBy(java.lang.String s) throws JasperException
JasperException
int skipSpaces() throws JasperException
JasperException
Mark skipUntil(java.lang.String limit) throws JasperException
s
- The String to match.Mark
instance (positioned immediately
before the search string) if found, null
otherwise.JasperException
Mark skipUntilIgnoreEsc(java.lang.String limit) throws JasperException
s
- The String to match.Mark
instance (positioned immediately
before the search string) if found, null
otherwise.JasperException
Mark skipUntilETag(java.lang.String tag) throws JasperException
tag
- The name of the tag whose ETag () to match.Mark
instance (positioned immediately
before the ETag) if found, null otherwise.JasperException
final boolean isSpace() throws JasperException
JasperException
java.lang.String parseToken(boolean quoted) throws JasperException
quoted
- If true accept quoted strings.JasperException
void setSingleFile(boolean val)
java.net.URL getResource(java.lang.String path) throws java.net.MalformedURLException
path
- Path namejava.net.MalformedURLException
- if the path name is not given in
the correct formprivate boolean isDelimiter() throws JasperException
isSpace
.JasperException
private int registerSourceFile(java.lang.String file)
private int unregisterSourceFile(java.lang.String file)
private void pushFile(java.lang.String file, java.lang.String encoding, java.io.InputStreamReader reader) throws JasperException, java.io.FileNotFoundException
JasperException
java.io.FileNotFoundException
private boolean popFile() throws JasperException
JasperException