< prev index next >
test/javax/xml/jaxp/libs/test/auctionportal/XInclHandler.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -55,19 +55,23 @@
*/
private volatile int fElementDepth;
/**
* Sets whether output is canonical.
+ *
+ * @param canonical if the output is canonical format.
*/
public void setCanonical(boolean canonical) {
fCanonical = canonical;
}
/**
* Sets the output stream for printing.
* @param stream OutputStream for message output.
* @param encoding File encoding for message output.
+ * @throws UnsupportedEncodingException if given encoding is an unsupported
+ * encoding name or invalid encoding name.
*/
public XInclHandler(OutputStream stream, String encoding)
throws UnsupportedEncodingException {
// At least set one encoding.
if (encoding == null) {
@@ -95,12 +99,12 @@
/**
* Receive notification of a processing instruction.
* @param target The processing instruction target.
* @param data The processing instruction data, or null if
* none is supplied.
- * @exception org.xml.sax.SAXException Any SAX exception, possibly
- * wrapping another exception.
+ * @exception SAXException Any SAX exception, possibly wrapping another
+ * exception.
*/
@Override
public void processingInstruction (String target, String data)
throws SAXException {
if (fElementDepth > 0) {
@@ -117,18 +121,20 @@
* Receive notification of the start of an element then write the normalized
* output to the file.
* @param uri The Namespace URI, or the empty string if the
* element has no Namespace URI or if Namespace
* processing is not being performed.
- * @param localName The local name (without prefix), or the
+ * @param local The local name (without prefix), or the
* empty string if Namespace processing is not being
* performed.
- * @param qName The qualified name (with prefix), or the
+ * @param raw The qualified name (with prefix), or the
* empty string if qualified names are not available.
- * @param attributes The attributes attached to the element. If
+ * @param attrs The attributes attached to the element. If
* there are no attributes, it shall be an empty
* Attributes object.
+ * @throws SAXException Any SAX exception, possibly wrapping another
+ * exception.
*/
@Override
public void startElement(String uri, String local, String raw,
Attributes attrs) throws SAXException {
fElementDepth++;
@@ -179,50 +185,51 @@
* Receive notification of the end of an element and print end element.
*
* @param uri The Namespace URI, or the empty string if the
* element has no Namespace URI or if Namespace
* processing is not being performed.
- * @param localName The local name (without prefix), or the
+ * @param local The local name (without prefix), or the
* empty string if Namespace processing is not being
* performed.
- * @param qName The qualified name (with prefix), or the
+ * @param raw The qualified name (with prefix), or the
* empty string if qualified names are not available.
+ * @throws org.xml.sax.SAXException Any SAX exception, possibly
+ * wrapping another exception.
*/
@Override
public void endElement(String uri, String local, String raw)
throws SAXException {
fElementDepth--;
writeFlush("</" + raw + ">");
}
/**
* Receive notification of a parser warning and print it out.
- * @param e The warning information encoded as an exception.
+ * @param ex The warning information encoded as an exception.
* @exception org.xml.sax.SAXException Any SAX exception, possibly
* wrapping another exception.
*/
@Override
public void warning(SAXParseException ex) throws SAXException {
printError("Warning", ex);
}
/**
* Receive notification of a parser error and print it out.
- * @param e The error information encoded as an exception.
+ * @param ex The error information encoded as an exception.
* @exception org.xml.sax.SAXException Any SAX exception, possibly
* wrapping another exception.
-
*/
@Override
public void error(SAXParseException ex) throws SAXException {
printError("Error", ex);
}
/**
* Receive notification of a parser fatal error. Throw out fatal error
* following print fatal error message.
- * @param e The fatal error information encoded as an exception.
+ * @param ex The fatal error information encoded as an exception.
* @exception org.xml.sax.SAXException Any SAX exception, possibly
* wrapping another exception.
*/
@Override
< prev index next >