Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.portal.resolver.xml
Interface DefaultContentHandler
- All Superinterfaces:
- org.xml.sax.ContentHandler, ResettableContentHandler
- All Known Subinterfaces:
- DefaultAtomContentHandler, DefaultAtomPublishingContentHandler, DefaultAtomThreadingContentHandler, DefaultHttpContentHandler, DefaultMashupContentHandler, DefaultMashupSitemapContentHandler, DefaultOpenSearchContentHandler, DefaultWebdavContentHandler, DefaultXulContentHandler
public interface DefaultContentHandler- extends ResettableContentHandler
General convenience interface that allows to format common data fields and write them as characters onto a content handler
- Since:
- 6.0.1
Method Summary void dateTime(java.util.Date date)
Converts the date into RFC 3066 format and Passes it on to the ContentHandler.characters(char[], int, int) method.void dateTime(long date)
Converts the date into RFC 3066 format and passes it on to the ContentHandler.characters(char[], int, int) method.org.xml.sax.ContentHandler getInnerContentHandler()
Return a ContentHandler that ignores calls to ContentHandler.startDocument() and ContentHandler.endDocument() but simply passes on all other calls to the DefaultContentHandler.javax.xml.transform.Result getResult()
Return a Result object that embeds the content into this handlerjava.io.Writer getWriter()
Return a Writer that will dispach all calls to the write methods to the ContentHandler.characters(char[], int, int) method.void number(int number)
Converts the number to a decimal string and passes it on to the ContentHandler.characters(char[], int, int) method.void number(long number)
Converts the number to a decimal string and passes it on to the ContentHandler.characters(char[], int, int) method.void text(java.lang.String text)
Passes the text string on to the ContentHandler.characters(char[], int, int) method.void text(java.lang.StringBuffer text)
Passes the text string on to the ContentHandler.characters(char[], int, int) method.void transform(javax.xml.transform.Source src)
Transforms the Source into this handlervoid uri(java.lang.String uri)
Passes the uri as a string string on to the ContentHandler.characters(char[], int, int) method.void uri(java.net.URI uri)
Passes the uri as a string string on to the ContentHandler.characters(char[], int, int) method.void uri(java.net.URL url)
Passes the uri as a string string on to the ContentHandler.characters(char[], int, int) method.void uri(java.net.URL baseURL, java.net.URL url, java.lang.Boolean bTryRelative)
Passes the uri as a string string on to the ContentHandler.characters(char[], int, int) method.
Methods inherited from interface org.xml.sax.ContentHandler characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
Method Detail dateTime
void dateTime(java.util.Date date) throws org.xml.sax.SAXException
- Converts the date into RFC 3066 format and Passes it on to the ContentHandler.characters(char[], int, int) method.
- Parameters:
- date - date to write, not null.
- Throws:
- org.xml.sax.SAXException - - if the text could not be written
dateTime
void dateTime(long date) throws org.xml.sax.SAXException
- Converts the date into RFC 3066 format and passes it on to the ContentHandler.characters(char[], int, int) method.
- Parameters:
- date - The date is specified as the milliseconds since January 1, 1970, 00:00:00 GMT. not null.
- Throws:
- org.xml.sax.SAXException - - if the text could not be written
getInnerContentHandler
org.xml.sax.ContentHandler getInnerContentHandler()
- Returns a ContentHandler that ignores calls to ContentHandler.startDocument() and ContentHandler.endDocument() but simply passes on all other calls to the DefaultContentHandler. This inner content handler is convenient to embed a second XML document into the document represented by the content handler. The easiest way to embed such a document is to use an identity transform with an arbitrary JAXP Source and a SAXResult that is attached to the inner content handler.
- Returns:
- A ContentHandler implementation that ignores document start and end calls.
getResult
javax.xml.transform.Result getResult()
- Returns a Result object that embeds the content into this handler
- Returns:
- the result, not null
- Since:
- 8.0
getWriter
java.io.Writer getWriter()
- Returns a Writer that will dispach all calls to the write methods to the ContentHandler.characters(char[], int, int) method.
- Returns:
- Writer object as a convenience object to write content
number
void number(int number) throws org.xml.sax.SAXException
- Converts the number to a decimal string and passes it on to the ContentHandler.characters(char[], int, int) method.
- Parameters:
- number - numeric value to write
- Throws:
- org.xml.sax.SAXException - - if the text could not be written
number
void number(long number) throws org.xml.sax.SAXException
- Converts the number to a decimal string and passes it on to the ContentHandler.characters(char[], int, int) method.
- Parameters:
- number - numeric value to write
- Throws:
- org.xml.sax.SAXException - - if the text could not be written
text
void text(java.lang.String text) throws org.xml.sax.SAXException
- Passes the text string on to the ContentHandler.characters(char[], int, int) method.
- Parameters:
- text - text string to write, not null.
- Throws:
- org.xml.sax.SAXException - - if the text could not be written
text
void text(java.lang.StringBuffer text) throws org.xml.sax.SAXException
- Passes the text string on to the ContentHandler.characters(char[], int, int) method.
- Parameters:
- text - text string to write, not null.
- Throws:
- org.xml.sax.SAXException - - if the text could not be written
transform
void transform(javax.xml.transform.Source src) throws javax.xml.transform.TransformerException
- Transforms the Source into this handler
- Parameters:
- src - the source to transform, not null
- Throws:
- javax.xml.transform.TransformerException
- Since:
- 8.0
uri
void uri(java.lang.String uri) throws org.xml.sax.SAXException
- Passes the uri as a string string on to the ContentHandler.characters(char[], int, int) method.
- Parameters:
- uri - uri to write, not null.
- Throws:
- org.xml.sax.SAXException - - if the text could not be written
uri
void uri(java.net.URI uri) throws org.xml.sax.SAXException
- Passes the uri as a string string on to the ContentHandler.characters(char[], int, int) method.
- Parameters:
- uri - uri to write, not null.
- Throws:
- org.xml.sax.SAXException - - if the text could not be written
uri
void uri(java.net.URL url) throws org.xml.sax.SAXException
- Passes the uri as a string string on to the ContentHandler.characters(char[], int, int) method.
- Parameters:
- url - uri to write, not null.
- Throws:
- org.xml.sax.SAXException - - if the text could not be written
uri
void uri(java.net.URL baseURL, java.net.URL url, java.lang.Boolean bTryRelative) throws org.xml.sax.SAXException
- Passes the uri as a string string on to the ContentHandler.characters(char[], int, int) method.
- Parameters:
- baseURL - a base URL that is used to compute a relative or full path URL, may be null
- url - uri to write, not null.
- bTryRelative - if true, the method tries to compute a relative URL to the base URL, otherwise it will first try to compute a full path URL (because this is faster).
- Throws:
- org.xml.sax.SAXException - - if the text could not be written
Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD