|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DefaultContentHandler
General convenience interface that allows to format common data fields and write them as characters onto a content handler
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()
Returns 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()
Returns a Result object that embeds the content into this handler |
java.io.Writer |
getWriter()
Returns 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 handler |
void |
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 |
---|
void dateTime(java.util.Date date) throws org.xml.sax.SAXException
ContentHandler.characters(char[], int, int)
method.
date
- date to write, not null
.
org.xml.sax.SAXException
- - if the text could not be writtenvoid dateTime(long date) throws org.xml.sax.SAXException
ContentHandler.characters(char[], int, int)
method.
date
- The date is specified as the milliseconds since January 1,
1970, 00:00:00 GMT. not null
.
org.xml.sax.SAXException
- - if the text could not be writtenorg.xml.sax.ContentHandler getInnerContentHandler()
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
javax.xml.transform.sax.SAXResult
that is attached to the inner
content handler.
ContentHandler
implementation that ignores document
start and end calls.javax.xml.transform.Result getResult()
Result
object that embeds the content into this handler
null
java.io.Writer getWriter()
Writer
that will dispach all calls to the write methods
to the ContentHandler.characters(char[], int, int)
method.
void number(int number) throws org.xml.sax.SAXException
ContentHandler.characters(char[], int, int)
method.
number
- numeric value to write
org.xml.sax.SAXException
- - if the text could not be writtenvoid number(long number) throws org.xml.sax.SAXException
ContentHandler.characters(char[], int, int)
method.
number
- numeric value to write
org.xml.sax.SAXException
- - if the text could not be writtenvoid text(java.lang.String text) throws org.xml.sax.SAXException
ContentHandler.characters(char[], int, int)
method.
text
- text string to write, not null
.
org.xml.sax.SAXException
- - if the text could not be writtenvoid text(java.lang.StringBuffer text) throws org.xml.sax.SAXException
ContentHandler.characters(char[], int, int)
method.
text
- text string to write, not null
.
org.xml.sax.SAXException
- - if the text could not be writtenvoid transform(javax.xml.transform.Source src) throws javax.xml.transform.TransformerException
Source
into this handler
src
- the source to transform, not null
javax.xml.transform.TransformerException
void uri(java.lang.String uri) throws org.xml.sax.SAXException
ContentHandler.characters(char[], int, int)
method.
uri
- uri to write, not null
.
org.xml.sax.SAXException
- - if the text could not be writtenvoid uri(java.net.URI uri) throws org.xml.sax.SAXException
ContentHandler.characters(char[], int, int)
method.
uri
- uri to write, not null
.
org.xml.sax.SAXException
- - if the text could not be writtenvoid uri(java.net.URL url) throws org.xml.sax.SAXException
ContentHandler.characters(char[], int, int)
method.
url
- uri to write, not null
.
org.xml.sax.SAXException
- - if the text could not be writtenvoid uri(java.net.URL baseURL, java.net.URL url, java.lang.Boolean bTryRelative) throws org.xml.sax.SAXException
ContentHandler.characters(char[], int, int)
method.
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).
org.xml.sax.SAXException
- - if the text could not be written
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |