protected StringBuilder reportBuf = new StringBuilder();
+ @Override
protected void printMessage(final String message,
final PrintStream stream,
final int priority) {
}
+ @Override
protected void log(String message) {
reportBuf.append(message);
reportBuf.append(System.getProperty("line.separator"));
/**
* Compile the servlet from .java file to .class file
*/
+ @Override
protected void generateClass(String[] smap)
throws FileNotFoundException, JasperException, Exception {
// ---------------------------------------------------- PrintStream Methods
+ @Override
public void flush() {
findStream().flush();
}
+ @Override
public void close() {
findStream().close();
}
+ @Override
public boolean checkError() {
return findStream().checkError();
}
+ @Override
protected void setError() {
//findStream().setError();
}
+ @Override
public void write(int b) {
findStream().write(b);
}
+ @Override
public void write(byte[] b)
throws IOException {
findStream().write(b);
}
+ @Override
public void write(byte[] buf, int off, int len) {
findStream().write(buf, off, len);
}
+ @Override
public void print(boolean b) {
findStream().print(b);
}
+ @Override
public void print(char c) {
findStream().print(c);
}
+ @Override
public void print(int i) {
findStream().print(i);
}
+ @Override
public void print(long l) {
findStream().print(l);
}
+ @Override
public void print(float f) {
findStream().print(f);
}
+ @Override
public void print(double d) {
findStream().print(d);
}
+ @Override
public void print(char[] s) {
findStream().print(s);
}
+ @Override
public void print(String s) {
findStream().print(s);
}
+ @Override
public void print(Object obj) {
findStream().print(obj);
}
+ @Override
public void println() {
findStream().println();
}
+ @Override
public void println(boolean x) {
findStream().println(x);
}
+ @Override
public void println(char x) {
findStream().println(x);
}
+ @Override
public void println(int x) {
findStream().println(x);
}
+ @Override
public void println(long x) {
findStream().println(x);
}
+ @Override
public void println(float x) {
findStream().println(x);
}
+ @Override
public void println(double x) {
findStream().println(x);
}
+ @Override
public void println(char[] x) {
findStream().println(x);
}
+ @Override
public void println(String x) {
findStream().println(x);
}
+ @Override
public void println(Object x) {
findStream().println(x);
}
private boolean setPropertySeen = false;
private boolean hasScriptingVars = false;
+ @Override
public void visit(Node.ParamAction n) throws JasperException {
if (n.getValue().isExpression()) {
scriptingElementSeen = true;
paramActionSeen = true;
}
+ @Override
public void visit(Node.IncludeAction n) throws JasperException {
if (n.getPage().isExpression()) {
scriptingElementSeen = true;
visitBody(n);
}
+ @Override
public void visit(Node.ForwardAction n) throws JasperException {
if (n.getPage().isExpression()) {
scriptingElementSeen = true;
visitBody(n);
}
+ @Override
public void visit(Node.SetProperty n) throws JasperException {
if (n.getValue() != null && n.getValue().isExpression()) {
scriptingElementSeen = true;
setPropertySeen = true;
}
+ @Override
public void visit(Node.UseBean n) throws JasperException {
if (n.getBeanName() != null && n.getBeanName().isExpression()) {
scriptingElementSeen = true;
visitBody(n);
}
+ @Override
public void visit(Node.PlugIn n) throws JasperException {
if (n.getHeight() != null && n.getHeight().isExpression()) {
scriptingElementSeen = true;
visitBody(n);
}
+ @Override
public void visit(Node.CustomTag n) throws JasperException {
// Check to see what kinds of element we see as child elements
checkSeen( n.getChildInfo(), n );
hasScriptingVars = hasScriptingVars || hasScriptingVarsSave;
}
+ @Override
public void visit(Node.JspElement n) throws JasperException {
if (n.getNameAttribute().isExpression())
scriptingElementSeen = true;
visitBody(n);
}
+ @Override
public void visit(Node.JspBody n) throws JasperException {
checkSeen( n.getChildInfo(), n );
}
+ @Override
public void visit(Node.NamedAttribute n) throws JasperException {
checkSeen( n.getChildInfo(), n );
}
+ @Override
public void visit(Node.Declaration n) throws JasperException {
scriptingElementSeen = true;
}
+ @Override
public void visit(Node.Expression n) throws JasperException {
scriptingElementSeen = true;
}
+ @Override
public void visit(Node.Scriptlet n) throws JasperException {
scriptingElementSeen = true;
}
}
}
+ @Override
public void visit(Node.PageDirective n) throws JasperException {
printAttributes("<%@ page", n.getAttributes(), "%>");
}
+ @Override
public void visit(Node.TaglibDirective n) throws JasperException {
printAttributes("<%@ taglib", n.getAttributes(), "%>");
}
+ @Override
public void visit(Node.IncludeDirective n) throws JasperException {
printAttributes("<%@ include", n.getAttributes(), "%>");
dumpBody(n);
}
+ @Override
public void visit(Node.Comment n) throws JasperException {
printString("<%--", n.getText(), "--%>");
}
+ @Override
public void visit(Node.Declaration n) throws JasperException {
printString("<%!", n.getText(), "%>");
}
+ @Override
public void visit(Node.Expression n) throws JasperException {
printString("<%=", n.getText(), "%>");
}
+ @Override
public void visit(Node.Scriptlet n) throws JasperException {
printString("<%", n.getText(), "%>");
}
+ @Override
public void visit(Node.IncludeAction n) throws JasperException {
printAttributes("<jsp:include", n.getAttributes(), ">");
dumpBody(n);
printString("</jsp:include>");
}
+ @Override
public void visit(Node.ForwardAction n) throws JasperException {
printAttributes("<jsp:forward", n.getAttributes(), ">");
dumpBody(n);
printString("</jsp:forward>");
}
+ @Override
public void visit(Node.GetProperty n) throws JasperException {
printAttributes("<jsp:getProperty", n.getAttributes(), "/>");
}
+ @Override
public void visit(Node.SetProperty n) throws JasperException {
printAttributes("<jsp:setProperty", n.getAttributes(), ">");
dumpBody(n);
printString("</jsp:setProperty>");
}
+ @Override
public void visit(Node.UseBean n) throws JasperException {
printAttributes("<jsp:useBean", n.getAttributes(), ">");
dumpBody(n);
printString("</jsp:useBean>");
}
+ @Override
public void visit(Node.PlugIn n) throws JasperException {
printAttributes("<jsp:plugin", n.getAttributes(), ">");
dumpBody(n);
printString("</jsp:plugin>");
}
+ @Override
public void visit(Node.ParamsAction n) throws JasperException {
printAttributes("<jsp:params", n.getAttributes(), ">");
dumpBody(n);
printString("</jsp:params>");
}
+ @Override
public void visit(Node.ParamAction n) throws JasperException {
printAttributes("<jsp:param", n.getAttributes(), ">");
dumpBody(n);
printString("</jsp:param>");
}
+ @Override
public void visit(Node.NamedAttribute n) throws JasperException {
printAttributes("<jsp:attribute", n.getAttributes(), ">");
dumpBody(n);
printString("</jsp:attribute>");
}
+ @Override
public void visit(Node.JspBody n) throws JasperException {
printAttributes("<jsp:body", n.getAttributes(), ">");
dumpBody(n);
printString("</jsp:body>");
}
+ @Override
public void visit(Node.ELExpression n) throws JasperException {
printString( "${" + new String( n.getText() ) + "}" );
}
+ @Override
public void visit(Node.CustomTag n) throws JasperException {
printAttributes("<" + n.getQName(), n.getAttributes(), ">");
dumpBody(n);
printString("</" + n.getQName() + ">");
}
- public void visit(Node.UninterpretedTag n) throws JasperException {
+ @Override
+ public void visit(Node.UninterpretedTag n) throws JasperException {
String tag = n.getQName();
printAttributes("<"+tag, n.getAttributes(), ">");
dumpBody(n);
printString("</" + tag + ">");
}
- public void visit(Node.TemplateText n) throws JasperException {
+ @Override
+ public void visit(Node.TemplateText n) throws JasperException {
printString(new String(n.getText()));
}
*/
private HashMap<String, String> gMap = new HashMap<String, String>();
+ @Override
public void visit(Node.ParamAction n) throws JasperException {
doMap(n.getValue());
visitBody(n);
}
+ @Override
public void visit(Node.IncludeAction n) throws JasperException {
doMap(n.getPage());
visitBody(n);
}
+ @Override
public void visit(Node.ForwardAction n) throws JasperException {
doMap(n.getPage());
visitBody(n);
}
+ @Override
public void visit(Node.SetProperty n) throws JasperException {
doMap(n.getValue());
visitBody(n);
}
+ @Override
public void visit(Node.UseBean n) throws JasperException {
doMap(n.getBeanName());
visitBody(n);
}
+ @Override
public void visit(Node.PlugIn n) throws JasperException {
doMap(n.getHeight());
doMap(n.getWidth());
visitBody(n);
}
+ @Override
public void visit(Node.JspElement n) throws JasperException {
Node.JspAttribute[] attrs = n.getJspAttributes();
visitBody(n);
}
+ @Override
public void visit(Node.UninterpretedTag n) throws JasperException {
Node.JspAttribute[] attrs = n.getJspAttributes();
visitBody(n);
}
+ @Override
public void visit(Node.CustomTag n) throws JasperException {
Node.JspAttribute[] attrs = n.getJspAttributes();
for (int i = 0; attrs != null && i < attrs.length; i++) {
visitBody(n);
}
+ @Override
public void visit(Node.ELExpression n) throws JasperException {
doMap(n.getEL());
}
ArrayList<ELNode.Function> funcs =
new ArrayList<ELNode.Function>();
HashMap<String, String> keyMap = new HashMap<String, String>();
+ @Override
public void visit(ELNode.Function n) throws JasperException {
String key = n.getPrefix() + ":" + n.getName();
if (! keyMap.containsKey(key)) {
this.type = type;
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
this.text = text;
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
this.text = text;
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
this.name = name;
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
return 0;
}
+ @Override
public String toString() {
return "";
}
this.id = id;
}
+ @Override
public String toString() {
return id;
}
this.ch = ch;
}
+ @Override
char toChar() {
return ch;
}
+ @Override
public String toString() {
return (new Character(ch)).toString();
}
this.value = v;
}
+ @Override
public String toString() {
return value;
}
this.lineNum = lineNum;
}
- public void doVisit(Node n) throws JasperException {
+ @Override
+ public void doVisit(Node n) throws JasperException {
if ((lineNum >= n.getBeginJavaLine())
&& (lineNum < n.getEndJavaLine())) {
found = n;
* contains more than one page directive with an 'info' attribute,
* their values match.
*/
+ @Override
public void visit(Node.PageDirective n) throws JasperException {
if (getServletInfoGenerated) {
out.println();
}
+ @Override
public void visit(Node.Declaration n) throws JasperException {
n.setBeginJavaLine(out.getJavaLine());
out.printMultiLn(new String(n.getText()));
}
// Custom Tags may contain declarations from tag plugins.
+ @Override
public void visit(Node.CustomTag n) throws JasperException {
if (n.useTagPlugin()) {
if (n.getAtSTag() != null) {
* and adds it to the list of tag handler pool names unless it is
* already contained in it.
*/
+ @Override
public void visit(Node.CustomTag n) throws JasperException {
if (!n.implementsSimpleTag()) {
vars = new Vector<String>();
}
+ @Override
public void visit(Node.CustomTag n) throws JasperException {
if (n.getCustomNestingLevel() > 0) {
this.separator = separator;
}
+ @Override
public void visit(Node.ParamAction n) throws JasperException {
out.print(" + ");
}
}
+ @Override
public void visit(Node.Expression n) throws JasperException {
n.setBeginJavaLine(out.getJavaLine());
out.printin("out.print(");
n.setEndJavaLine(out.getJavaLine());
}
+ @Override
public void visit(Node.Scriptlet n) throws JasperException {
n.setBeginJavaLine(out.getJavaLine());
out.printMultiLn(n.getText());
n.setEndJavaLine(out.getJavaLine());
}
+ @Override
public void visit(Node.ELExpression n) throws JasperException {
n.setBeginJavaLine(out.getJavaLine());
if (!pageInfo.isELIgnored() && (n.getEL() != null)) {
n.setEndJavaLine(out.getJavaLine());
}
+ @Override
public void visit(Node.IncludeAction n) throws JasperException {
String flush = n.getTextAttribute("flush");
return result;
}
+ @Override
public void visit(Node.ForwardAction n) throws JasperException {
Node.JspAttribute page = n.getPage();
// XXX Not sure if we can eliminate dead codes after this.
}
+ @Override
public void visit(Node.GetProperty n) throws JasperException {
String name = n.getTextAttribute("name");
String property = n.getTextAttribute("property");
n.setEndJavaLine(out.getJavaLine());
}
+ @Override
public void visit(Node.SetProperty n) throws JasperException {
String name = n.getTextAttribute("name");
String property = n.getTextAttribute("property");
n.setEndJavaLine(out.getJavaLine());
}
+ @Override
public void visit(Node.UseBean n) throws JasperException {
String name = n.getTextAttribute("id");
return " " + attr + "=\"" + value + '\"';
}
+ @Override
public void visit(Node.PlugIn n) throws JasperException {
/**
this.ie = ie;
}
+ @Override
public void visit(Node.ParamAction n) throws JasperException {
String name = n.getTextAttribute("name");
n.setEndJavaLine(out.getJavaLine());
}
+ @Override
public void visit(Node.NamedAttribute n) throws JasperException {
// Don't visit body of this tag - we already did earlier.
}
+ @Override
public void visit(Node.CustomTag n) throws JasperException {
// Use plugin to generate more efficient code if there is one.
private static final String DOUBLE_QUOTE = "\\\"";
+ @Override
public void visit(Node.UninterpretedTag n) throws JasperException {
n.setBeginJavaLine(out.getJavaLine());
n.setEndJavaLine(out.getJavaLine());
}
+ @Override
public void visit(Node.JspElement n) throws JasperException {
n.setBeginJavaLine(out.getJavaLine());
}
}
+ @Override
public void visit(Node.TemplateText n) throws JasperException {
String text = n.getText();
n.setEndJavaLine(out.getJavaLine());
}
+ @Override
public void visit(Node.JspBody n) throws JasperException {
if (n.getBody() != null) {
if (isSimpleTagHandler) {
}
}
+ @Override
public void visit(Node.InvokeAction n) throws JasperException {
n.setBeginJavaLine(out.getJavaLine());
n.setEndJavaLine(out.getJavaLine());
}
+ @Override
public void visit(Node.DoBodyAction n) throws JasperException {
n.setBeginJavaLine(out.getJavaLine());
n.setEndJavaLine(out.getJavaLine());
}
+ @Override
public void visit(Node.AttributeGenerator n) throws JasperException {
Node.CustomTag tag = n.getTag();
Node.JspAttribute[] attrs = tag.getJspAttributes();
return out;
}
+ @Override
public String toString() {
return charWriter.toString();
}
try {
body.visit(new Node.Visitor() {
+ @Override
public void doVisit(Node n) {
adjustJavaLine(n, offset);
}
+ @Override
public void visit(Node.CustomTag n)
throws JasperException {
Node.Nodes b = n.getBody();
out.popIndent();
}
+ @Override
public String toString() {
return classBuffer.toString();
}
* @return The TagFileInfo corresponding to the given tag name, or null if
* the given tag name is not implemented as a tag file
*/
+ @Override
public TagFileInfo getTagFile(String shortName) {
TagFileInfo tagFile = super.getTagFile(shortName);
return tagFile;
}
+ @Override
public TagLibraryInfo[] getTagLibraryInfos() {
Collection<TagLibraryInfo> coll = pi.getTaglibs();
return coll.toArray(new TagLibraryInfo[0]);
/**
* Compile the servlet from .java file to .class file
*/
+ @Override
protected void generateClass(String[] smap)
throws FileNotFoundException, JasperException, Exception {
return dynamicAttrsMapName;
}
+ @Override
public boolean hasDynamicAttributes() {
return dynamicAttrsMapName != null;
}
* corresponding TagLibraryInfo object is added to the set of custom
* tag libraries.
*/
+ @Override
public void startElement(
String uri,
String localName,
*
* @throws SAXException
*/
+ @Override
public void characters(char[] buf, int offset, int len) {
if (charBuffer == null) {
/*
* Receives notification of the end of an element.
*/
+ @Override
public void endElement(String uri, String localName, String qName)
throws SAXException {
*
* @param locator the document locator
*/
+ @Override
public void setDocumentLocator(Locator locator) {
this.locator = locator;
}
/*
* Receives notification of a non-recoverable error.
*/
+ @Override
public void fatalError(SAXParseException e) throws SAXException {
throw e;
}
/*
* Receives notification of a recoverable error.
*/
+ @Override
public void error(SAXParseException e) throws SAXException {
throw e;
}
/*
* Receives notification of the start of a Namespace mapping.
*/
+ @Override
public void startPrefixMapping(String prefix, String uri)
throws SAXException {
TagLibraryInfo taglibInfo;
/*
* Receives notification of the end of a Namespace mapping.
*/
+ @Override
public void endPrefixMapping(String prefix) throws SAXException {
if (directivesOnly) {
return null;
}
+ @Override
public String toString() {
return getFile()+"("+line+","+col+")";
}
return ctxt.getResource(getFile());
}
+ @Override
public boolean equals(Object other) {
if (other instanceof Mark) {
Mark m = (Mark) other;
parentRoot = (Node.Root) r;
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
imports = new Vector<String>();
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
taglibAttrs, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
imports = new Vector<String>();
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
nonTaglibXmlnsAttrs, taglibAttrs, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
taglibAttrs, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
taglibAttrs, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
taglibAttrs, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
super(null, null, text, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
*
* @return The text string
*/
+ @Override
public String getText() {
String ret = text;
if (ret == null) {
* For the same reason as above, the source line information in the
* contained TemplateText node should be used.
*/
+ @Override
public Mark getStart() {
if (text == null && body != null && body.size() > 0) {
return body.getNode(0).getStart();
start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
this.type = type;
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
taglibAttrs, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
taglibAttrs, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
taglibAttrs, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
taglibAttrs, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
taglibAttrs, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
taglibAttrs, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
taglibAttrs, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
taglibAttrs, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
taglibAttrs, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
this.implementsDynamicAttributes = tagInfo.hasDynamicAttributes();
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
this.tag = tag;
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
}
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
return this.name;
}
+ @Override
public String getLocalName() {
return this.localName;
}
* Since this method is only for attributes that are not rtexpr, we can
* assume the body of the jsp:attribute is a template text.
*/
+ @Override
public String getText() {
class AttributeVisitor extends Visitor {
String attrValue = null;
+ @Override
public void visit(TemplateText txt) {
attrValue = new String(txt.getText());
}
this.childInfo = new ChildInfo();
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
super(null, null, text, start, parent);
}
+ @Override
public void accept(Visitor v) throws JasperException {
v.visit(this);
}
*
* @return the input stream of the XML view
*/
+ @Override
public InputStream getInputStream() {
// Turn StringBuilder into InputStream
try {
this.jspIdPrefix = "jsp";
}
- public void visit(Node.Root n) throws JasperException {
+ @Override
+ public void visit(Node.Root n) throws JasperException {
visitBody(n);
if (n == root) {
/*
}
}
- public void visit(Node.JspRoot n) throws JasperException {
+ @Override
+ public void visit(Node.JspRoot n) throws JasperException {
addAttributes(n.getTaglibAttributes());
addAttributes(n.getNonTaglibXmlnsAttributes());
addAttributes(n.getAttributes());
* Converts taglib directive into "xmlns:..." attribute of jsp:root
* element.
*/
- public void visit(Node.TaglibDirective n) throws JasperException {
+ @Override
+ public void visit(Node.TaglibDirective n) throws JasperException {
Attributes attrs = n.getAttributes();
if (attrs != null) {
String qName = "xmlns:" + attrs.getValue("prefix");
/*
* Visits root node.
*/
- public void visit(Node.Root n) throws JasperException {
+ @Override
+ public void visit(Node.Root n) throws JasperException {
if (n == this.root) {
// top-level page
appendXmlProlog();
* Any nested jsp:root elements (from pages included via an
* include directive) are ignored.
*/
- public void visit(Node.JspRoot n) throws JasperException {
+ @Override
+ public void visit(Node.JspRoot n) throws JasperException {
visitBody(n);
}
- public void visit(Node.PageDirective n) throws JasperException {
+ @Override
+ public void visit(Node.PageDirective n) throws JasperException {
appendPageDirective(n);
}
- public void visit(Node.IncludeDirective n) throws JasperException {
+ @Override
+ public void visit(Node.IncludeDirective n) throws JasperException {
// expand in place
visitBody(n);
}
- public void visit(Node.Comment n) throws JasperException {
+ @Override
+ public void visit(Node.Comment n) throws JasperException {
// Comments are ignored in XML view
}
- public void visit(Node.Declaration n) throws JasperException {
+ @Override
+ public void visit(Node.Declaration n) throws JasperException {
appendTag(n);
}
- public void visit(Node.Expression n) throws JasperException {
+ @Override
+ public void visit(Node.Expression n) throws JasperException {
appendTag(n);
}
- public void visit(Node.Scriptlet n) throws JasperException {
+ @Override
+ public void visit(Node.Scriptlet n) throws JasperException {
appendTag(n);
}
- public void visit(Node.JspElement n) throws JasperException {
+ @Override
+ public void visit(Node.JspElement n) throws JasperException {
appendTag(n);
}
- public void visit(Node.ELExpression n) throws JasperException {
+ @Override
+ public void visit(Node.ELExpression n) throws JasperException {
if (!n.getRoot().isXmlSyntax()) {
buf.append("<").append(JSP_TEXT_ACTION);
buf.append(" ");
buf.append("\n");
}
- public void visit(Node.IncludeAction n) throws JasperException {
+ @Override
+ public void visit(Node.IncludeAction n) throws JasperException {
appendTag(n);
}
- public void visit(Node.ForwardAction n) throws JasperException {
+ @Override
+ public void visit(Node.ForwardAction n) throws JasperException {
appendTag(n);
}
- public void visit(Node.GetProperty n) throws JasperException {
+ @Override
+ public void visit(Node.GetProperty n) throws JasperException {
appendTag(n);
}
- public void visit(Node.SetProperty n) throws JasperException {
+ @Override
+ public void visit(Node.SetProperty n) throws JasperException {
appendTag(n);
}
- public void visit(Node.ParamAction n) throws JasperException {
+ @Override
+ public void visit(Node.ParamAction n) throws JasperException {
appendTag(n);
}
- public void visit(Node.ParamsAction n) throws JasperException {
+ @Override
+ public void visit(Node.ParamsAction n) throws JasperException {
appendTag(n);
}
- public void visit(Node.FallBackAction n) throws JasperException {
+ @Override
+ public void visit(Node.FallBackAction n) throws JasperException {
appendTag(n);
}
- public void visit(Node.UseBean n) throws JasperException {
+ @Override
+ public void visit(Node.UseBean n) throws JasperException {
appendTag(n);
}
- public void visit(Node.PlugIn n) throws JasperException {
+ @Override
+ public void visit(Node.PlugIn n) throws JasperException {
appendTag(n);
}
+ @Override
public void visit(Node.NamedAttribute n) throws JasperException {
appendTag(n);
}
+ @Override
public void visit(Node.JspBody n) throws JasperException {
appendTag(n);
}
- public void visit(Node.CustomTag n) throws JasperException {
+ @Override
+ public void visit(Node.CustomTag n) throws JasperException {
boolean resetDefaultNSSave = resetDefaultNS;
appendTag(n, resetDefaultNS);
resetDefaultNS = resetDefaultNSSave;
}
- public void visit(Node.UninterpretedTag n) throws JasperException {
+ @Override
+ public void visit(Node.UninterpretedTag n) throws JasperException {
boolean resetDefaultNSSave = resetDefaultNS;
appendTag(n, resetDefaultNS);
resetDefaultNS = resetDefaultNSSave;
}
- public void visit(Node.JspText n) throws JasperException {
+ @Override
+ public void visit(Node.JspText n) throws JasperException {
appendTag(n);
}
- public void visit(Node.DoBodyAction n) throws JasperException {
+ @Override
+ public void visit(Node.DoBodyAction n) throws JasperException {
appendTag(n);
}
+ @Override
public void visit(Node.InvokeAction n) throws JasperException {
appendTag(n);
}
- public void visit(Node.TagDirective n) throws JasperException {
+ @Override
+ public void visit(Node.TagDirective n) throws JasperException {
appendTagDirective(n);
}
- public void visit(Node.AttributeDirective n) throws JasperException {
+ @Override
+ public void visit(Node.AttributeDirective n) throws JasperException {
appendTag(n);
}
- public void visit(Node.VariableDirective n) throws JasperException {
+ @Override
+ public void visit(Node.VariableDirective n) throws JasperException {
appendTag(n);
}
- public void visit(Node.TemplateText n) throws JasperException {
+ @Override
+ public void visit(Node.TemplateText n) throws JasperException {
/*
* If the template text came from a JSP page written in JSP syntax,
* create a jsp:text element for it (JSP 5.3.2).
private int count;
private Node.CustomTag parent;
- public void visit(Node.CustomTag n) throws JasperException {
+ @Override
+ public void visit(Node.CustomTag n) throws JasperException {
n.setCustomTagParent(parent);
Node.CustomTag tmpParent = parent;
parent = n;
scriptVars = new Hashtable<String,Integer>();
}
- public void visit(Node.CustomTag n) throws JasperException {
+ @Override
+ public void visit(Node.CustomTag n) throws JasperException {
setScriptingVars(n, VariableInfo.AT_BEGIN);
setScriptingVars(n, VariableInfo.NESTED);
new ScriptingVariableVisitor(err).visitBody(n);
return out.toString();
}
+ @Override
public String toString() { return getString(); }
//*********************************************************************
return out.toString();
}
+ @Override
public String toString() {
return getString();
}
return out.toString();
}
+ @Override
public String toString() {
return getString();
}
this.innerClassMap = map;
}
+ @Override
public void visitBody(Node n) throws JasperException {
SmapStratum smapSave = smap;
String innerClass = n.getInnerClassName();
smap = smapSave;
}
+ @Override
public void visit(Node.Declaration n) throws JasperException {
doSmapText(n);
}
+ @Override
public void visit(Node.Expression n) throws JasperException {
doSmapText(n);
}
+ @Override
public void visit(Node.Scriptlet n) throws JasperException {
doSmapText(n);
}
+ @Override
public void visit(Node.IncludeAction n) throws JasperException {
doSmap(n);
visitBody(n);
}
+ @Override
public void visit(Node.ForwardAction n) throws JasperException {
doSmap(n);
visitBody(n);
}
+ @Override
public void visit(Node.GetProperty n) throws JasperException {
doSmap(n);
visitBody(n);
}
+ @Override
public void visit(Node.SetProperty n) throws JasperException {
doSmap(n);
visitBody(n);
}
+ @Override
public void visit(Node.UseBean n) throws JasperException {
doSmap(n);
visitBody(n);
}
+ @Override
public void visit(Node.PlugIn n) throws JasperException {
doSmap(n);
visitBody(n);
}
+ @Override
public void visit(Node.CustomTag n) throws JasperException {
doSmap(n);
visitBody(n);
}
+ @Override
public void visit(Node.UninterpretedTag n) throws JasperException {
doSmap(n);
visitBody(n);
}
+ @Override
public void visit(Node.JspElement n) throws JasperException {
doSmap(n);
visitBody(n);
}
+ @Override
public void visit(Node.JspText n) throws JasperException {
doSmap(n);
visitBody(n);
}
+ @Override
public void visit(Node.NamedAttribute n) throws JasperException {
visitBody(n);
}
+ @Override
public void visit(Node.JspBody n) throws JasperException {
doSmap(n);
visitBody(n);
}
+ @Override
public void visit(Node.InvokeAction n) throws JasperException {
doSmap(n);
visitBody(n);
}
+ @Override
public void visit(Node.DoBodyAction n) throws JasperException {
doSmap(n);
visitBody(n);
}
+ @Override
public void visit(Node.ELExpression n) throws JasperException {
doSmap(n);
}
+ @Override
public void visit(Node.TemplateText n) throws JasperException {
Mark mark = n.getStart();
if (mark == null) {
HashMap<String, SmapStratum> map = new HashMap<String, SmapStratum>();
+ @Override
public void doVisit(Node n) {
String inner = n.getInnerClassName();
if (inner != null && !map.containsKey(inner)) {
variableVector = new Vector<TagVariableInfo>();
}
+ @Override
public void visit(Node.TagDirective n) throws JasperException {
JspUtil.checkAttributes("Tag directive", n, tagDirectiveAttrs, err);
return result;
}
+ @Override
public void visit(Node.AttributeDirective n) throws JasperException {
JspUtil.checkAttributes("Attribute directive", n,
checkUniqueName(attrName, ATTR_NAME, n, tagAttributeInfo);
}
+ @Override
public void visit(Node.VariableDirective n) throws JasperException {
JspUtil.checkAttributes("Variable directive", n,
this.pageInfo = compiler.getPageInfo();
}
+ @Override
public void visit(Node.CustomTag n) throws JasperException {
TagFileInfo tagFileInfo = n.getTagFileInfo();
if (tagFileInfo != null) {
}
}
+ @Override
public String toString() {
StringWriter sw = new StringWriter();
PrintWriter out = new PrintWriter(sw);
}
+ @Override
public TagLibraryInfo[] getTagLibraryInfos() {
Collection<TagLibraryInfo> coll = pi.getTaglibs();
return coll.toArray(new TagLibraryInfo[0]);
this.pageInfo = pageInfo;
page.visit(new Node.Visitor() {
+ @Override
public void visit(Node.CustomTag n)
throws JasperException {
invokePlugin(n);
pageInfo = compiler.getPageInfo();
}
+ @Override
public void doVisit(Node n) throws JasperException {
collectText();
}
* The following directis are ignored in text concatenation
*/
+ @Override
public void visit(Node.PageDirective n) throws JasperException {
}
+ @Override
public void visit(Node.TagDirective n) throws JasperException {
}
+ @Override
public void visit(Node.TaglibDirective n) throws JasperException {
}
+ @Override
public void visit(Node.AttributeDirective n) throws JasperException {
}
+ @Override
public void visit(Node.VariableDirective n) throws JasperException {
}
/*
* Don't concatenate text across body boundaries
*/
+ @Override
public void visitBody(Node n) throws JasperException {
super.visitBody(n);
collectText();
}
+ @Override
public void visit(Node.TemplateText n) throws JasperException {
if ((options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces())
&& n.isAllSpace()) {
this.err = compiler.getErrorDispatcher();
}
+ @Override
public void visit(Node.IncludeDirective n) throws JasperException {
// Since pageDirectiveSeen flag only applies to the Current page
// save it here and restore it after the file is included.
pageEncodingSeen = pageEncodingSeenSave;
}
+ @Override
public void visit(Node.PageDirective n) throws JasperException {
JspUtil.checkAttributes("Page directive", n, pageDirectiveAttrs,
pageInfo.addImports(n.getImports());
}
+ @Override
public void visit(Node.TagDirective n) throws JasperException {
// Note: Most of the validation is done in TagFileProcessor
// when it created a TagInfo object from the
pageInfo.addImports(n.getImports());
}
+ @Override
public void visit(Node.AttributeDirective n) throws JasperException {
// Do nothing, since this attribute directive has already been
// validated by TagFileProcessor when it created a TagInfo object
// from the tag file in which the directive appeared
}
+ @Override
public void visit(Node.VariableDirective n) throws JasperException {
// Do nothing, since this variable directive has already been
// validated by TagFileProcessor when it created a TagInfo object
this.loader = compiler.getCompilationContext().getClassLoader();
}
+ @Override
public void visit(Node.JspRoot n) throws JasperException {
JspUtil.checkAttributes("Jsp:root", n, jspRootAttrs, err);
String version = n.getTextAttribute("version");
visitBody(n);
}
+ @Override
public void visit(Node.IncludeDirective n) throws JasperException {
JspUtil.checkAttributes("Include directive", n,
includeDirectiveAttrs, err);
visitBody(n);
}
+ @Override
public void visit(Node.TaglibDirective n) throws JasperException {
JspUtil.checkAttributes("Taglib directive", n,
taglibDirectiveAttrs, err);
}
}
+ @Override
public void visit(Node.ParamAction n) throws JasperException {
JspUtil.checkAttributes("Param action", n, paramActionAttrs, err);
// make sure the value of the 'name' attribute is not a
visitBody(n);
}
+ @Override
public void visit(Node.ParamsAction n) throws JasperException {
// Make sure we've got at least one nested jsp:param
Node.Nodes subElems = n.getBody();
visitBody(n);
}
+ @Override
public void visit(Node.IncludeAction n) throws JasperException {
JspUtil.checkAttributes("Include action", n, includeActionAttrs,
err);
visitBody(n);
}
+ @Override
public void visit(Node.ForwardAction n) throws JasperException {
JspUtil.checkAttributes("Forward", n, forwardActionAttrs, err);
n.setPage(getJspAttribute(null, "page", null, null, n
visitBody(n);
}
+ @Override
public void visit(Node.GetProperty n) throws JasperException {
JspUtil.checkAttributes("GetProperty", n, getPropertyAttrs, err);
}
+ @Override
public void visit(Node.SetProperty n) throws JasperException {
JspUtil.checkAttributes("SetProperty", n, setPropertyAttrs, err);
String property = n.getTextAttribute("property");
visitBody(n);
}
+ @Override
public void visit(Node.UseBean n) throws JasperException {
JspUtil.checkAttributes("UseBean", n, useBeanAttrs, err);
visitBody(n);
}
+ @Override
public void visit(Node.PlugIn n) throws JasperException {
JspUtil.checkAttributes("Plugin", n, plugInAttrs, err);
visitBody(n);
}
+ @Override
public void visit(Node.NamedAttribute n) throws JasperException {
JspUtil.checkAttributes("Attribute", n, attributeAttrs, err);
visitBody(n);
}
+ @Override
public void visit(Node.JspBody n) throws JasperException {
visitBody(n);
}
+ @Override
public void visit(Node.Declaration n) throws JasperException {
if (pageInfo.isScriptingInvalid()) {
err.jspError(n.getStart(), "jsp.error.no.scriptlets");
}
}
+ @Override
public void visit(Node.Expression n) throws JasperException {
if (pageInfo.isScriptingInvalid()) {
err.jspError(n.getStart(), "jsp.error.no.scriptlets");
}
}
+ @Override
public void visit(Node.Scriptlet n) throws JasperException {
if (pageInfo.isScriptingInvalid()) {
err.jspError(n.getStart(), "jsp.error.no.scriptlets");
}
}
+ @Override
public void visit(Node.ELExpression n) throws JasperException {
// exit if we are ignoring EL all together
if (pageInfo.isELIgnored())
n.setEL(el);
}
+ @Override
public void visit(Node.UninterpretedTag n) throws JasperException {
if (n.getNamedAttributeNodes().size() != 0) {
err.jspError(n, "jsp.error.namedAttribute.invalidUse");
return false;
}
+ @Override
public void visit(Node.CustomTag n) throws JasperException {
TagInfo tagInfo = n.getTagInfo();
visitBody(n);
}
+ @Override
public void visit(Node.JspElement n) throws JasperException {
Attributes attrs = n.getAttributes();
visitBody(n);
}
+ @Override
public void visit(Node.JspOutput n) throws JasperException {
JspUtil.checkAttributes("jsp:output", n, jspOutputAttrs, err);
}
}
+ @Override
public void visit(Node.InvokeAction n) throws JasperException {
JspUtil.checkAttributes("Invoke", n, invokeAttrs, err);
}
}
+ @Override
public void visit(Node.DoBodyAction n) throws JasperException {
JspUtil.checkAttributes("DoBody", n, doBodyAttrs, err);
private static class NamedAttributeVisitor extends Node.Visitor {
private boolean hasDynamicContent;
+ @Override
public void doVisit(Node n) throws JasperException {
if (!(n instanceof Node.JspText)
&& !(n instanceof Node.TemplateText)) {
this.n = n;
}
+ @Override
public void visit(ELNode.Function func) throws JasperException {
String prefix = func.getPrefix();
String function = func.getName();
fnmap.put(fnQName, method);
}
+ @Override
public Method resolveFunction(String prefix, String localName) {
return this.fnmap.get(prefix + ":" + localName);
}
this.fmapper = fmapper;
}
+ @Override
public void visit(ELNode.Function n) throws JasperException {
Class<?> c = null;
this.err = compiler.getErrorDispatcher();
}
+ @Override
public void visit(Node.CustomTag n) throws JasperException {
TagInfo tagInfo = n.getTagInfo();
if (tagInfo == null) {
public final class ELContextImpl extends ELContext {
private final static FunctionMapper NullFunctionMapper = new FunctionMapper() {
+ @Override
public Method resolveFunction(String prefix, String localName) {
return null;
}
private Map<String, ValueExpression> vars;
+ @Override
public ValueExpression resolveVariable(String variable) {
if (vars == null) {
return null;
return vars.get(variable);
}
+ @Override
public ValueExpression setVariable(String variable,
ValueExpression expression) {
if (vars == null)
this(ELResolverImpl.getDefaultResolver());
if (Constants.IS_SECURITY_ENABLED) {
functionMapper = new FunctionMapper() {
+ @Override
public Method resolveFunction(String prefix, String localName) {
return null;
}
this.resolver = resolver;
}
+ @Override
public ELResolver getELResolver() {
return this.resolver;
}
+ @Override
public FunctionMapper getFunctionMapper() {
return this.functionMapper;
}
+ @Override
public VariableMapper getVariableMapper() {
if (this.variableMapper == null) {
this.variableMapper = new VariableMapperImpl();
this.fnMapper = fnMapper;
}
+ @Override
public ELResolver getELResolver() {
return this.target.getELResolver();
}
+ @Override
public FunctionMapper getFunctionMapper() {
if (this.fnMapper != null) return this.fnMapper;
return this.target.getFunctionMapper();
}
+ @Override
public VariableMapper getVariableMapper() {
return this.target.getVariableMapper();
}
+ @Override
public Object getContext(Class key) {
return this.target.getContext(key);
}
+ @Override
public Locale getLocale() {
return this.target.getLocale();
}
+ @Override
public boolean isPropertyResolved() {
return this.target.isPropertyResolved();
}
+ @Override
public void putContext(Class key, Object contextObject) throws NullPointerException {
this.target.putContext(key, contextObject);
}
+ @Override
public void setLocale(Locale locale) {
this.target.setLocale(locale);
}
+ @Override
public void setPropertyResolved(boolean resolved) {
this.target.setPropertyResolved(resolved);
}
this.variableResolver = variableResolver;
}
- public Object getValue(ELContext context, Object base, Object property)
+ @Override
+ public Object getValue(ELContext context, Object base, Object property)
throws NullPointerException, PropertyNotFoundException, ELException {
if (context == null) {
throw new NullPointerException();
return null;
}
- public Class<?> getType(ELContext context, Object base, Object property)
+ @Override
+ public Class<?> getType(ELContext context, Object base, Object property)
throws NullPointerException, PropertyNotFoundException, ELException {
if (context == null) {
throw new NullPointerException();
return null;
}
- public void setValue(ELContext context, Object base, Object property,
+ @Override
+ public void setValue(ELContext context, Object base, Object property,
Object value) throws NullPointerException,
PropertyNotFoundException, PropertyNotWritableException,
ELException {
}
}
- public boolean isReadOnly(ELContext context, Object base, Object property)
+ @Override
+ public boolean isReadOnly(ELContext context, Object base, Object property)
throws NullPointerException, PropertyNotFoundException, ELException {
if (context == null) {
throw new NullPointerException();
return getDefaultResolver().isReadOnly(context, base, property);
}
- public Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+ @Override
+ public Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
return getDefaultResolver().getFeatureDescriptors(context, base);
}
- public Class<?> getCommonPropertyType(ELContext context, Object base) {
+ @Override
+ public Class<?> getCommonPropertyType(ELContext context, Object base) {
if (base == null) {
return String.class;
}
this.factory = factory;
}
- public Expression parseExpression(String expression, Class<?> expectedType,
+ @Override
+ public Expression parseExpression(String expression, Class<?> expectedType,
FunctionMapper fMapper) throws ELException {
try {
ELContextImpl ctx =
}
}
- public Object evaluate(String expression, Class<?> expectedType,
+ @Override
+ public Object evaluate(String expression, Class<?> expectedType,
VariableResolver vResolver, FunctionMapper fMapper)
throws ELException {
return this.parseExpression(expression, expectedType, fMapper).evaluate(vResolver);
this.ve = ve;
}
- public Object evaluate(VariableResolver vResolver) throws ELException {
+ @Override
+ public Object evaluate(VariableResolver vResolver) throws ELException {
ELContext ctx = new ELContextImpl(new ELResolverImpl(vResolver));
return ve.getValue(ctx);
}
this.fnMapper = fnMapper;
}
- public Method resolveFunction(String prefix, String localName) {
+ @Override
+ public Method resolveFunction(String prefix, String localName) {
return this.fnMapper.resolveFunction(prefix, localName);
}
this.mark = mark;
}
+ @Override
public MethodInfo getMethodInfo(ELContext context)
throws NullPointerException, PropertyNotFoundException,
MethodNotFoundException, ELException {
}
}
+ @Override
public Object invoke(ELContext context, Object[] params)
throws NullPointerException, PropertyNotFoundException,
MethodNotFoundException, ELException {
}
}
+ @Override
public boolean equals(Object obj) {
return this.target.equals(obj);
}
+ @Override
public int hashCode() {
return this.target.hashCode();
}
+ @Override
public String getExpressionString() {
return this.target.getExpressionString();
}
+ @Override
public boolean isLiteralText() {
return this.target.isLiteralText();
}
this.mark = mark;
}
+ @Override
public Class<?> getExpectedType() {
return this.target.getExpectedType();
}
+ @Override
public Class<?> getType(ELContext context) throws NullPointerException,
PropertyNotFoundException, ELException {
try {
}
}
+ @Override
public boolean isReadOnly(ELContext context) throws NullPointerException,
PropertyNotFoundException, ELException {
try {
}
}
+ @Override
public void setValue(ELContext context, Object value)
throws NullPointerException, PropertyNotFoundException,
PropertyNotWritableException, ELException {
}
}
+ @Override
public Object getValue(ELContext context) throws NullPointerException,
PropertyNotFoundException, ELException {
try {
}
}
+ @Override
public boolean equals(Object obj) {
return this.target.equals(obj);
}
+ @Override
public int hashCode() {
return this.target.hashCode();
}
+ @Override
public String getExpressionString() {
return this.target.getExpressionString();
}
+ @Override
public boolean isLiteralText() {
return this.target.isLiteralText();
}
/**
* Write a single character.
*/
+ @Override
public void write(int c) throws IOException {
if (writer != null) {
writer.write(c);
* @param off Offset from which to start reading characters
* @param len Number of characters to write
*/
+ @Override
public void write(char[] cbuf, int off, int len) throws IOException {
if (writer != null) {
writer.write(cbuf, off, len);
* Write an array of characters. This method cannot be inherited from the
* Writer class because it must suppress I/O exceptions.
*/
+ @Override
public void write(char[] buf) throws IOException {
if (writer != null) {
writer.write(buf);
* @param off Offset from which to start reading characters
* @param len Number of characters to be written
*/
+ @Override
public void write(String s, int off, int len) throws IOException {
if (writer != null) {
writer.write(s, off, len);
* Write a string. This method cannot be inherited from the Writer class
* because it must suppress I/O exceptions.
*/
+ @Override
public void write(String s) throws IOException {
if (writer != null) {
writer.write(s);
*
* @throws IOException If an I/O error occurs
*/
+ @Override
public void newLine() throws IOException {
if (writer != null) {
writer.write(LINE_SEPARATOR);
* @param b The <code>boolean</code> to be printed
* @throws IOException
*/
+ @Override
public void print(boolean b) throws IOException {
if (writer != null) {
writer.write(b ? "true" : "false");
* @param c The <code>char</code> to be printed
* @throws IOException
*/
+ @Override
public void print(char c) throws IOException {
if (writer != null) {
writer.write(String.valueOf(c));
* @param i The <code>int</code> to be printed
* @throws IOException
*/
+ @Override
public void print(int i) throws IOException {
if (writer != null) {
writer.write(String.valueOf(i));
* @param l The <code>long</code> to be printed
* @throws IOException
*/
+ @Override
public void print(long l) throws IOException {
if (writer != null) {
writer.write(String.valueOf(l));
* @param f The <code>float</code> to be printed
* @throws IOException
*/
+ @Override
public void print(float f) throws IOException {
if (writer != null) {
writer.write(String.valueOf(f));
* @param d The <code>double</code> to be printed
* @throws IOException
*/
+ @Override
public void print(double d) throws IOException {
if (writer != null) {
writer.write(String.valueOf(d));
* @throws NullPointerException If <code>s</code> is <code>null</code>
* @throws IOException
*/
+ @Override
public void print(char[] s) throws IOException {
if (writer != null) {
writer.write(s);
* @param s The <code>String</code> to be printed
* @throws IOException
*/
+ @Override
public void print(String s) throws IOException {
if (s == null) s = "null";
if (writer != null) {
* @param obj The <code>Object</code> to be printed
* @throws IOException
*/
+ @Override
public void print(Object obj) throws IOException {
if (writer != null) {
writer.write(String.valueOf(obj));
*
* @throws IOException
*/
+ @Override
public void println() throws IOException {
newLine();
}
*
* @throws IOException
*/
+ @Override
public void println(boolean x) throws IOException {
print(x);
println();
*
* @throws IOException
*/
+ @Override
public void println(char x) throws IOException {
print(x);
println();
*
* @throws IOException
*/
+ @Override
public void println(int x) throws IOException {
print(x);
println();
*
* @throws IOException
*/
+ @Override
public void println(long x) throws IOException {
print(x);
println();
*
* @throws IOException
*/
+ @Override
public void println(float x) throws IOException {
print(x);
println();
*
* @throws IOException
*/
+ @Override
public void println(double x) throws IOException{
print(x);
println();
*
* @throws IOException
*/
+ @Override
public void println(char x[]) throws IOException {
print(x);
println();
*
* @throws IOException
*/
+ @Override
public void println(String x) throws IOException {
print(x);
println();
*
* @throws IOException
*/
+ @Override
public void println(Object x) throws IOException {
print(x);
println();
*
* @throws IOException If an I/O error occurs
*/
+ @Override
public void clear() throws IOException {
if (writer != null) {
throw new IOException();
*
* @throws IOException If an I/O error occurs
*/
+ @Override
public void clearBuffer() throws IOException {
if (writer == null) {
this.clear();
*
* @throws IOException If an I/O error occurs
*/
+ @Override
public void close() throws IOException {
if (writer != null) {
writer.close();
*
* @return the size of the buffer in bytes, or 0 is unbuffered.
*/
+ @Override
public int getBufferSize() {
// According to the spec, the JspWriter returned by
// JspContext.pushBody(java.io.Writer writer) must behave as
/**
* @return the number of bytes unused in the buffer
*/
+ @Override
public int getRemaining() {
return (writer == null) ? bufferSize-nextChar : 0;
}
*
* @return the value of this BodyJspWriter as a Reader
*/
+ @Override
public Reader getReader() {
return (writer == null) ? new CharArrayReader (cb, 0, nextChar) : null;
}
*
* @return the value of the BodyJspWriter as a String
*/
+ @Override
public String getString() {
return (writer == null) ? new String(cb, 0, nextChar) : null;
}
* @param out The writer into which to place the contents of this body
* evaluation
*/
+ @Override
public void writeOut(Writer out) throws IOException {
if (writer == null) {
out.write(cb, 0, nextChar);
protected HttpJspBase() {
}
+ @Override
public final void init(ServletConfig config)
throws ServletException
{
_jspInit();
}
+ @Override
public String getServletInfo() {
return Localizer.getMessage("jsp.engine.info");
}
+ @Override
public final void destroy() {
jspDestroy();
_jspDestroy();
/**
* Entry point into service.
*/
+ @Override
public final void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
syncBeginTagFile();
}
- public void initialize(Servlet servlet, ServletRequest request,
+ @Override
+ public void initialize(Servlet servlet, ServletRequest request,
ServletResponse response, String errorPageURL,
boolean needsSession, int bufferSize, boolean autoFlush)
throws IOException, IllegalStateException, IllegalArgumentException {
}
- public Object getAttribute(String name) {
+ @Override
+ public Object getAttribute(String name) {
if (name == null) {
throw new NullPointerException(Localizer
return pageAttributes.get(name);
}
- public Object getAttribute(String name, int scope) {
+ @Override
+ public Object getAttribute(String name, int scope) {
if (name == null) {
throw new NullPointerException(Localizer
return invokingJspCtxt.getAttribute(name, scope);
}
- public void setAttribute(String name, Object value) {
+ @Override
+ public void setAttribute(String name, Object value) {
if (name == null) {
throw new NullPointerException(Localizer
}
}
- public void setAttribute(String name, Object value, int scope) {
+ @Override
+ public void setAttribute(String name, Object value, int scope) {
if (name == null) {
throw new NullPointerException(Localizer
}
}
- public Object findAttribute(String name) {
+ @Override
+ public Object findAttribute(String name) {
if (name == null) {
throw new NullPointerException(Localizer
return o;
}
- public void removeAttribute(String name) {
+ @Override
+ public void removeAttribute(String name) {
if (name == null) {
throw new NullPointerException(Localizer
invokingJspCtxt.removeAttribute(name, APPLICATION_SCOPE);
}
- public void removeAttribute(String name, int scope) {
+ @Override
+ public void removeAttribute(String name, int scope) {
if (name == null) {
throw new NullPointerException(Localizer
}
}
- public int getAttributesScope(String name) {
+ @Override
+ public int getAttributesScope(String name) {
if (name == null) {
throw new NullPointerException(Localizer
}
}
- public Enumeration<String> getAttributeNamesInScope(int scope) {
+ @Override
+ public Enumeration<String> getAttributeNamesInScope(int scope) {
if (scope == PAGE_SCOPE) {
return new Enumerator<String>(pageAttributes.keySet().iterator());
}
return invokingJspCtxt.getAttributeNamesInScope(scope);
}
- public void release() {
+ @Override
+ public void release() {
invokingJspCtxt.release();
}
- public JspWriter getOut() {
+ @Override
+ public JspWriter getOut() {
return invokingJspCtxt.getOut();
}
- public HttpSession getSession() {
+ @Override
+ public HttpSession getSession() {
return invokingJspCtxt.getSession();
}
- public Object getPage() {
+ @Override
+ public Object getPage() {
return invokingJspCtxt.getPage();
}
- public ServletRequest getRequest() {
+ @Override
+ public ServletRequest getRequest() {
return invokingJspCtxt.getRequest();
}
- public ServletResponse getResponse() {
+ @Override
+ public ServletResponse getResponse() {
return invokingJspCtxt.getResponse();
}
- public Exception getException() {
+ @Override
+ public Exception getException() {
return invokingJspCtxt.getException();
}
- public ServletConfig getServletConfig() {
+ @Override
+ public ServletConfig getServletConfig() {
return invokingJspCtxt.getServletConfig();
}
- public ServletContext getServletContext() {
+ @Override
+ public ServletContext getServletContext() {
return invokingJspCtxt.getServletContext();
}
- public void forward(String relativeUrlPath) throws ServletException,
+ @Override
+ public void forward(String relativeUrlPath) throws ServletException,
IOException {
invokingJspCtxt.forward(relativeUrlPath);
}
- public void include(String relativeUrlPath) throws ServletException,
+ @Override
+ public void include(String relativeUrlPath) throws ServletException,
IOException {
invokingJspCtxt.include(relativeUrlPath);
}
- public void include(String relativeUrlPath, boolean flush)
+ @Override
+ public void include(String relativeUrlPath, boolean flush)
throws ServletException, IOException {
invokingJspCtxt.include(relativeUrlPath, false);
}
- public VariableResolver getVariableResolver() {
+ @Override
+ public VariableResolver getVariableResolver() {
return this;
}
- public BodyContent pushBody() {
+ @Override
+ public BodyContent pushBody() {
return invokingJspCtxt.pushBody();
}
- public JspWriter pushBody(Writer writer) {
+ @Override
+ public JspWriter pushBody(Writer writer) {
return invokingJspCtxt.pushBody(writer);
}
- public JspWriter popBody() {
+ @Override
+ public JspWriter popBody() {
return invokingJspCtxt.popBody();
}
- public ExpressionEvaluator getExpressionEvaluator() {
+ @Override
+ public ExpressionEvaluator getExpressionEvaluator() {
return invokingJspCtxt.getExpressionEvaluator();
}
- public void handlePageException(Exception ex) throws IOException,
+ @Override
+ public void handlePageException(Exception ex) throws IOException,
ServletException {
// Should never be called since handleException() called with a
// Throwable in the generated servlet.
handlePageException((Throwable) ex);
}
- public void handlePageException(Throwable t) throws IOException,
+ @Override
+ public void handlePageException(Throwable t) throws IOException,
ServletException {
invokingJspCtxt.handlePageException(t);
}
//private ELContextImpl elContext;
- public ELContext getELContext() {
+ @Override
+ public ELContext getELContext() {
// instead decorate!!!
return this.invokingJspCtxt.getELContext();
private ThreadLocal<PageContextPool> localPool = new ThreadLocal<PageContextPool>();
+ @Override
public PageContext getPageContext(Servlet servlet, ServletRequest request,
ServletResponse response, String errorPageURL, boolean needsSession,
int bufferSize, boolean autoflush) {
}
}
+ @Override
public void releasePageContext(PageContext pc) {
if( pc == null )
return;
}
}
+ @Override
public JspEngineInfo getEngineInfo() {
return new JspEngineInfo() {
+ @Override
public String getSpecificationVersion() {
return SPEC_VERSION;
}
}
+ @Override
public JspApplicationContext getJspApplicationContext(
final ServletContext context) {
if (Constants.IS_SECURITY_ENABLED) {
this.parentTag = parentTag;
}
+ @Override
public JspContext getJspContext() {
return this.jspContext;
}
/**
* Discard the output buffer.
*/
+ @Override
public final void clear() throws IOException {
if ((bufferSize == 0) && (out != null))
// clear() is illegal after any unbuffered output (JSP.5.5)
nextChar = 0;
}
+ @Override
public void clearBuffer() throws IOException {
if (bufferSize == 0)
throw new IllegalStateException(
* Flush the stream.
*
*/
+ @Override
public void flush() throws IOException {
flushBuffer();
if (out != null) {
* Close the stream.
*
*/
+ @Override
public void close() throws IOException {
if (response == null || closed)
// multiple calls to close is OK
/**
* @return the number of bytes unused in the buffer
*/
+ @Override
public int getRemaining() {
return bufferSize - nextChar;
}
/**
* Write a single character.
*/
+ @Override
public void write(int c) throws IOException {
ensureOpen();
if (bufferSize == 0) {
* @param off Offset from which to start reading characters
* @param len Number of characters to write
*/
+ @Override
public void write(char cbuf[], int off, int len)
throws IOException
{
* Write an array of characters. This method cannot be inherited from the
* Writer class because it must suppress I/O exceptions.
*/
+ @Override
public void write(char buf[]) throws IOException {
write(buf, 0, buf.length);
}
* @param off Offset from which to start reading characters
* @param len Number of characters to be written
*/
+ @Override
public void write(String s, int off, int len) throws IOException {
ensureOpen();
if (bufferSize == 0) {
* Write a string. This method cannot be inherited from the Writer class
* because it must suppress I/O exceptions.
*/
+ @Override
public void write(String s) throws IOException {
// Simple fix for Bugzilla 35410
// Calling the other write function so as to init the buffer anyways
* @exception IOException If an I/O error occurs
*/
+ @Override
public void newLine() throws IOException {
write(lineSeparator);
}
*
* @param b The <code>boolean</code> to be printed
*/
+ @Override
public void print(boolean b) throws IOException {
write(b ? "true" : "false");
}
*
* @param c The <code>char</code> to be printed
*/
+ @Override
public void print(char c) throws IOException {
write(String.valueOf(c));
}
*
* @param i The <code>int</code> to be printed
*/
+ @Override
public void print(int i) throws IOException {
write(String.valueOf(i));
}
*
* @param l The <code>long</code> to be printed
*/
+ @Override
public void print(long l) throws IOException {
write(String.valueOf(l));
}
*
* @param f The <code>float</code> to be printed
*/
+ @Override
public void print(float f) throws IOException {
write(String.valueOf(f));
}
*
* @param d The <code>double</code> to be printed
*/
+ @Override
public void print(double d) throws IOException {
write(String.valueOf(d));
}
*
* @throws NullPointerException If <code>s</code> is <code>null</code>
*/
+ @Override
public void print(char s[]) throws IOException {
write(s);
}
*
* @param s The <code>String</code> to be printed
*/
+ @Override
public void print(String s) throws IOException {
if (s == null) {
s = "null";
*
* @param obj The <code>Object</code> to be printed
*/
+ @Override
public void print(Object obj) throws IOException {
write(String.valueOf(obj));
}
* println() writes to the sink directly instead of through the
* write method...
*/
+ @Override
public void println() throws IOException {
newLine();
}
* as though it invokes <code>{@link #print(boolean)}</code> and then
* <code>{@link #println()}</code>.
*/
+ @Override
public void println(boolean x) throws IOException {
print(x);
println();
* though it invokes <code>{@link #print(char)}</code> and then <code>{@link
* #println()}</code>.
*/
+ @Override
public void println(char x) throws IOException {
print(x);
println();
* though it invokes <code>{@link #print(int)}</code> and then <code>{@link
* #println()}</code>.
*/
+ @Override
public void println(int x) throws IOException {
print(x);
println();
* as though it invokes <code>{@link #print(long)}</code> and then
* <code>{@link #println()}</code>.
*/
+ @Override
public void println(long x) throws IOException {
print(x);
println();
* behaves as though it invokes <code>{@link #print(float)}</code> and then
* <code>{@link #println()}</code>.
*/
+ @Override
public void println(float x) throws IOException {
print(x);
println();
* line. This method behaves as though it invokes <code>{@link
* #print(double)}</code> and then <code>{@link #println()}</code>.
*/
+ @Override
public void println(double x) throws IOException {
print(x);
println();
* behaves as though it invokes <code>{@link #print(char[])}</code> and then
* <code>{@link #println()}</code>.
*/
+ @Override
public void println(char x[]) throws IOException {
print(x);
println();
* though it invokes <code>{@link #print(String)}</code> and then
* <code>{@link #println()}</code>.
*/
+ @Override
public void println(String x) throws IOException {
print(x);
println();
* though it invokes <code>{@link #print(Object)}</code> and then
* <code>{@link #println()}</code>.
*/
+ @Override
public void println(Object x) throws IOException {
print(x);
println();
this.depth = -1;
}
- public void initialize(Servlet servlet, ServletRequest request,
+ @Override
+ public void initialize(Servlet servlet, ServletRequest request,
ServletResponse response, String errorPageURL,
boolean needsSession, int bufferSize, boolean autoFlush)
throws IOException {
isIncluded = request.getAttribute("javax.servlet.include.servlet_path") != null;
}
- public void release() {
+ @Override
+ public void release() {
out = baseOut;
try {
if (isIncluded) {
}
}
- public Object getAttribute(final String name) {
+ @Override
+ public Object getAttribute(final String name) {
if (name == null) {
throw new NullPointerException(Localizer
return attributes.get(name);
}
- public Object getAttribute(final String name, final int scope) {
+ @Override
+ public Object getAttribute(final String name, final int scope) {
if (name == null) {
throw new NullPointerException(Localizer
}
}
- public void setAttribute(final String name, final Object attribute) {
+ @Override
+ public void setAttribute(final String name, final Object attribute) {
if (name == null) {
throw new NullPointerException(Localizer
}
}
- public void setAttribute(final String name, final Object o, final int scope) {
+ @Override
+ public void setAttribute(final String name, final Object o, final int scope) {
if (name == null) {
throw new NullPointerException(Localizer
}
}
- public void removeAttribute(final String name, final int scope) {
+ @Override
+ public void removeAttribute(final String name, final int scope) {
if (name == null) {
throw new NullPointerException(Localizer
}
}
- public int getAttributesScope(final String name) {
+ @Override
+ public int getAttributesScope(final String name) {
if (name == null) {
throw new NullPointerException(Localizer
return 0;
}
- public Object findAttribute(final String name) {
+ @Override
+ public Object findAttribute(final String name) {
if (SecurityUtil.isPackageProtectionEnabled()) {
return AccessController.doPrivileged(
new PrivilegedAction<Object>() {
return context.getAttribute(name);
}
- public Enumeration<String> getAttributeNamesInScope(final int scope) {
+ @Override
+ public Enumeration<String> getAttributeNamesInScope(final int scope) {
if (SecurityUtil.isPackageProtectionEnabled()) {
return AccessController.doPrivileged(
new PrivilegedAction<Enumeration<String>>() {
}
}
- public void removeAttribute(final String name) {
+ @Override
+ public void removeAttribute(final String name) {
if (name == null) {
throw new NullPointerException(Localizer
removeAttribute(name, APPLICATION_SCOPE);
}
- public JspWriter getOut() {
+ @Override
+ public JspWriter getOut() {
return out;
}
- public HttpSession getSession() {
+ @Override
+ public HttpSession getSession() {
return session;
}
return servlet;
}
- public ServletConfig getServletConfig() {
+ @Override
+ public ServletConfig getServletConfig() {
return config;
}
- public ServletContext getServletContext() {
+ @Override
+ public ServletContext getServletContext() {
return config.getServletContext();
}
- public ServletRequest getRequest() {
+ @Override
+ public ServletRequest getRequest() {
return request;
}
- public ServletResponse getResponse() {
+ @Override
+ public ServletResponse getResponse() {
return response;
}
*
* @return The Exception associated with this page context, if any.
*/
- public Exception getException() {
+ @Override
+ public Exception getException() {
Throwable t = JspRuntimeLibrary.getThrowable(request);
// Only wrap if needed
return (Exception) t;
}
- public Object getPage() {
+ @Override
+ public Object getPage() {
return servlet;
}
return path;
}
- public void include(String relativeUrlPath) throws ServletException,
+ @Override
+ public void include(String relativeUrlPath) throws ServletException,
IOException {
JspRuntimeLibrary
.include(request, response, relativeUrlPath, out, true);
}
- public void include(final String relativeUrlPath, final boolean flush)
+ @Override
+ public void include(final String relativeUrlPath, final boolean flush)
throws ServletException, IOException {
if (SecurityUtil.isPackageProtectionEnabled()) {
try {
flush);
}
- public VariableResolver getVariableResolver() {
+ @Override
+ public VariableResolver getVariableResolver() {
return new VariableResolverImpl(this.getELContext());
}
- public void forward(final String relativeUrlPath) throws ServletException,
+ @Override
+ public void forward(final String relativeUrlPath) throws ServletException,
IOException {
if (SecurityUtil.isPackageProtectionEnabled()) {
try {
}
}
- public BodyContent pushBody() {
+ @Override
+ public BodyContent pushBody() {
return (BodyContent) pushBody(null);
}
- public JspWriter pushBody(Writer writer) {
+ @Override
+ public JspWriter pushBody(Writer writer) {
depth++;
if (depth >= outs.length) {
BodyContentImpl[] newOuts = new BodyContentImpl[depth + 1];
return outs[depth];
}
- public JspWriter popBody() {
+ @Override
+ public JspWriter popBody() {
depth--;
if (depth >= 0) {
out = outs[depth];
* Container must return a valid instance of an ExpressionEvaluator that can
* parse EL expressions.
*/
- public ExpressionEvaluator getExpressionEvaluator() {
+ @Override
+ public ExpressionEvaluator getExpressionEvaluator() {
return new ExpressionEvaluatorImpl(this.applicationContext.getExpressionFactory());
}
- public void handlePageException(Exception ex) throws IOException,
+ @Override
+ public void handlePageException(Exception ex) throws IOException,
ServletException {
// Should never be called since handleException() called with a
// Throwable in the generated servlet.
handlePageException((Throwable) ex);
}
- public void handlePageException(final Throwable t) throws IOException,
+ @Override
+ public void handlePageException(final Throwable t) throws IOException,
ServletException {
if (t == null)
throw new NullPointerException("null Throwable");
return retValue;
}
- public ELContext getELContext() {
+ @Override
+ public ELContext getELContext() {
if (this.elContext == null) {
this.elContext = this.applicationContext.createELContext(this);
}
perThreadDataVector = new Vector<PerThreadData>();
}
+ @Override
protected void init(ServletConfig config) {
maxSize = Constants.MAX_POOL_SIZE;
String maxSizeS = getOption(config, OPTION_MAXSIZE, null);
}
perThread = new ThreadLocal<PerThreadData>() {
+ @Override
protected PerThreadData initialValue() {
PerThreadData ptd = new PerThreadData();
ptd.handlers = new Tag[maxSize];
*
* @throws JspException if a tag handler cannot be instantiated
*/
+ @Override
public Tag get(Class<? extends Tag> handlerClass) throws JspException {
PerThreadData ptd = perThread.get();
if(ptd.current >=0 ) {
*
* @param handler Tag handler to add to this tag handler pool
*/
+ @Override
public void reuse(Tag handler) {
PerThreadData ptd = perThread.get();
if (ptd.current < (ptd.handlers.length - 1)) {
/**
* Calls the release() method of all tag handlers in this tag handler pool.
*/
+ @Override
public void release() {
Enumeration<PerThreadData> enumeration = perThreadDataVector.elements();
while (enumeration.hasMoreElements()) {
* the short name of the function
* @return the result of the method mapping. Null means no entry found.
*/
+ @Override
public Method resolveFunction(String prefix, String localName) {
if (this.fnmap != null) {
return this.fnmap.get(prefix + ":" + localName);
/**
* Returns a wrapper around the JspWriter of the including page.
*/
+ @Override
public PrintWriter getWriter() throws IOException {
return printWriter;
}
+ @Override
public ServletOutputStream getOutputStream() throws IOException {
throw new IllegalStateException();
}
* Clears the output buffer of the JspWriter associated with the including
* page.
*/
+ @Override
public void resetBuffer() {
try {
jspWriter.clearBuffer();
*
* @exception ClassNotFoundException if the class was not found
*/
+ @Override
public Class<?> loadClass(String name) throws ClassNotFoundException {
return (loadClass(name, false));
*
* @exception ClassNotFoundException if the class was not found
*/
+ @Override
public Class<?> loadClass(final String name, boolean resolve)
throws ClassNotFoundException {
*
* @see java.lang.ClassLoader#getResourceAsStream(java.lang.String)
*/
+ @Override
public InputStream getResourceAsStream(String name) {
InputStream is = parent.getResourceAsStream(name);
if (is == null) {
* @param codeSource Code source where the code was loaded from
* @return PermissionCollection for CodeSource
*/
+ @Override
public final PermissionCollection getPermissions(CodeSource codeSource) {
return permissionCollection;
}
/*
* Initializes this JspServlet.
*/
+ @Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
}
+ @Override
public void service (HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
}
+ @Override
public void destroy() {
if (log.isDebugEnabled()) {
log.debug("JspServlet.destroy()");
private StringWriter sw = new StringWriter();
private ByteArrayOutputStream bos = new ByteArrayOutputStream();
private ServletOutputStream sos = new ServletOutputStream() {
+ @Override
public void write(int b) throws IOException {
bos.write(b);
}
// TODO Auto-generated constructor stub
}
+ @Override
public PrintWriter getWriter() {
if (isStreamUsed)
throw new IllegalStateException("Unexpected internal error during <import>: " +
return new PrintWriter(sw);
}
+ @Override
public ServletOutputStream getOutputStream() {
if (isWriterUsed)
throw new IllegalStateException("Unexpected internal error during <import>: " +
}
/** Has no effect. */
+ @Override
public void setContentType(String x) {
// ignore
}
/** Has no effect. */
+ @Override
public void setLocale(Locale x) {
// ignore
}
+ @Override
public void setStatus(int status) {
this.status = status;
}
+ @Override
public int getStatus() {
return status;
}
*
* @exception IOException If an I/O error occurs
*/
+ @Override
public int read() throws IOException {
int b0 = fInputStream.read();
if (b0 > 0x80) {
*
* @exception IOException If an I/O error occurs
*/
+ @Override
public int read(char ch[], int offset, int length) throws IOException {
if (length > fBuffer.length) {
length = fBuffer.length;
*
* @exception IOException If an I/O error occurs
*/
+ @Override
public long skip(long n) throws IOException {
return fInputStream.skip(n);
} // skip(long):long
*
* @exception IOException If an I/O error occurs
*/
+ @Override
public boolean ready() throws IOException {
return false;
} // ready()
/**
* Tell whether this stream supports the mark() operation.
*/
+ @Override
public boolean markSupported() {
return fInputStream.markSupported();
} // markSupported()
* @exception IOException If the stream does not support mark(),
* or if some other I/O error occurs
*/
+ @Override
public void mark(int readAheadLimit) throws IOException {
fInputStream.mark(readAheadLimit);
} // mark(int)
* or if the stream does not support reset(),
* or if some other I/O error occurs
*/
+ @Override
public void reset() throws IOException {
fInputStream.reset();
} // reset()
*
* @exception IOException If an I/O error occurs
*/
- public void close() throws IOException {
+ @Override
+ public void close() throws IOException {
fInputStream.close();
} // close()
/**
* Return a String representation of this TreeNode.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
*
* @exception IOException If an I/O error occurs
*/
+ @Override
public int read() throws IOException {
int b0 = fInputStream.read() & 0xff;
if (b0 == 0xff)
*
* @exception IOException If an I/O error occurs
*/
+ @Override
public int read(char ch[], int offset, int length) throws IOException {
int byteLength = length << ((fEncoding >= 4)?2:1);
if (byteLength > fBuffer.length) {
*
* @exception IOException If an I/O error occurs
*/
+ @Override
public long skip(long n) throws IOException {
// charWidth will represent the number of bits to move
// n leftward to get num of bytes to skip, and then move the result rightward
*
* @exception IOException If an I/O error occurs
*/
+ @Override
public boolean ready() throws IOException {
return false;
} // ready()
/**
* Tell whether this stream supports the mark() operation.
*/
+ @Override
public boolean markSupported() {
return fInputStream.markSupported();
} // markSupported()
* @exception IOException If the stream does not support mark(),
* or if some other I/O error occurs
*/
+ @Override
public void mark(int readAheadLimit) throws IOException {
fInputStream.mark(readAheadLimit);
} // mark(int)
* or if the stream does not support reset(),
* or if some other I/O error occurs
*/
+ @Override
public void reset() throws IOException {
fInputStream.reset();
} // reset()
*
* @exception IOException If an I/O error occurs
*/
- public void close() throws IOException {
+ @Override
+ public void close() throws IOException {
fInputStream.close();
} // close()
*
* @exception IOException If an I/O error occurs
*/
+ @Override
public int read() throws IOException {
// decode character
*
* @exception IOException If an I/O error occurs
*/
+ @Override
public int read(char ch[], int offset, int length) throws IOException {
// handle surrogate
*
* @exception IOException If an I/O error occurs
*/
+ @Override
public long skip(long n) throws IOException {
long remaining = n;
*
* @exception IOException If an I/O error occurs
*/
+ @Override
public boolean ready() throws IOException {
return false;
} // ready()
/**
* Tell whether this stream supports the mark() operation.
*/
+ @Override
public boolean markSupported() {
return false;
} // markSupported()
* @exception IOException If the stream does not support mark(),
* or if some other I/O error occurs
*/
+ @Override
public void mark(int readAheadLimit) throws IOException {
throw new IOException(
Localizer.getMessage("jsp.error.xml.operationNotSupported",
* or if the stream does not support reset(),
* or if some other I/O error occurs
*/
+ @Override
public void reset() throws IOException {
fOffset = 0;
fSurrogate = -1;
*
* @exception IOException If an I/O error occurs
*/
+ @Override
public void close() throws IOException {
fInputStream.close();
} // close()
fOffset = fStartOffset;
}
+ @Override
public int read() throws IOException {
int b = 0;
if (fOffset < fLength) {
return b & 0xff;
}
+ @Override
public int read(byte[] b, int off, int len) throws IOException {
int bytesLeft = fLength - fOffset;
if (bytesLeft == 0) {
return len;
}
+ @Override
public long skip(long n)
throws IOException
{
return fInputStream.skip(n) + bytesLeft;
}
+ @Override
public int available() throws IOException {
int bytesLeft = fLength - fOffset;
if (bytesLeft == 0) {
return bytesLeft;
}
+ @Override
public void mark(int howMuch) {
fMark = fOffset;
}
+ @Override
public void reset() {
fOffset = fMark;
}
+ @Override
public boolean markSupported() {
return true;
}
+ @Override
public void close() throws IOException {
if (fInputStream != null) {
fInputStream.close();
//
/** Returns a string representation of this object. */
+ @Override
public String toString() {
return length > 0 ? new String(ch, offset, length) : "";
} // toString():String
//
/** Clears the string buffer. */
+ @Override
public void clear() {
offset = 0;
length = 0;