< prev index next >

test/javax/xml/jaxp/libs/test/auctionportal/XInclHandler.java

Print this page

        

*** 55,73 **** --- 55,77 ---- */ 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,106 **** /** * 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. */ @Override public void processingInstruction (String target, String data) throws SAXException { if (fElementDepth > 0) { --- 99,110 ---- /** * 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 SAXException Any SAX exception, possibly wrapping another ! * exception. */ @Override public void processingInstruction (String target, String data) throws SAXException { if (fElementDepth > 0) {
*** 117,134 **** * 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 * empty string if Namespace processing is not being * performed. ! * @param qName The qualified name (with prefix), or the * empty string if qualified names are not available. ! * @param attributes The attributes attached to the element. If * there are no attributes, it shall be an empty * Attributes object. */ @Override public void startElement(String uri, String local, String raw, Attributes attrs) throws SAXException { fElementDepth++; --- 121,140 ---- * 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 local The local name (without prefix), or the * empty string if Namespace processing is not being * performed. ! * @param raw The qualified name (with prefix), or the * empty string if qualified names are not available. ! * @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,228 **** * 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 * empty string if Namespace processing is not being * performed. ! * @param qName The qualified name (with prefix), or the * empty string if qualified names are not available. */ @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. * @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. * @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. * @exception org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. */ @Override --- 185,235 ---- * 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 local The local name (without prefix), or the * empty string if Namespace processing is not being * performed. ! * @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 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 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 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 >