|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.util.protocol.xmlrpc.XblWriterImpl
public class XblWriterImpl
Default implementation of XMLWriter
. Works with Java 1.2 and
later.
Nested Class Summary | |
---|---|
private class |
XblWriterImpl.FineWriter
|
Field Summary | |
---|---|
(package private) int |
curIndent
|
private boolean |
declarating
|
private java.util.Map |
delayedPrefixes
|
private java.lang.String |
encoding
|
private boolean |
flushing
|
private boolean |
indenting
|
private java.lang.String |
indentString
|
private org.xml.sax.Locator |
l
|
private java.lang.String |
lineFeed
|
private static java.util.logging.Logger |
log
|
private int |
state
|
private static int |
STATE_IN_ELEMENT
|
private static int |
STATE_IN_START_ELEMENT
|
private static int |
STATE_OUTSIDE
|
private boolean |
useCDATA
|
private java.io.Writer |
w
|
Constructor Summary | |
---|---|
XblWriterImpl()
|
Method Summary | |
---|---|
boolean |
canEncode(char c)
|
void |
characters(char[] ch,
int start,
int length)
Inserts a string of characters into the document. |
void |
charactersOrig(char[] ch,
int start,
int length)
Inserts a string of characters into the document. |
void |
endDocument()
This method finishs the handlers action. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
Terminates an element. |
void |
endPrefixMapping(java.lang.String prefix)
Terminates use of a namespace prefix. |
org.xml.sax.Locator |
getDocumentLocator()
Returns the locator |
java.lang.String |
getEncoding()
|
java.lang.String |
getIndentString()
|
java.lang.String |
getLineFeed()
|
java.io.Writer |
getWriter()
Returns the JaxbXMLSerializers Writer. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Calls the character method with the same arguments. |
private void |
indentMe()
|
boolean |
isDeclarating()
|
boolean |
isFlushing()
|
boolean |
isIndenting()
|
private boolean |
needsEncoding(java.lang.String txt)
|
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Inserts a processing instruction. |
void |
setDeclarating(boolean pDeclarating)
|
void |
setDocumentLocator(org.xml.sax.Locator pLocator)
Sets the locator. |
void |
setEncoding(java.lang.String pEncoding)
|
void |
setFlushing(boolean pFlushing)
|
void |
setIndenting(boolean pIndenting)
|
void |
setIndentString(java.lang.String pIndentString)
|
void |
setLineFeed(java.lang.String pLineFeed)
|
void |
setUseCData(boolean use)
|
void |
setWriter(java.io.Writer pWriter)
Sets the JaxbXMLSerializers Writer. |
void |
skippedEntity(java.lang.String ent)
Not actually implemented, because I don't know how to skip entities. |
void |
startDocument()
Starts a document. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attr)
Starts a new element. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String namespaceURI)
Starts use of a namespace prefix. |
private void |
stopTerminator()
|
private void |
wrapWithCDATAIfNecessary(char[] ch,
int start,
int length,
java.io.Writer wr)
|
private void |
writeCData(java.lang.String v)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.logging.Logger log
private static final int STATE_OUTSIDE
private static final int STATE_IN_START_ELEMENT
private static final int STATE_IN_ELEMENT
private java.lang.String encoding
private java.lang.String indentString
private java.lang.String lineFeed
private java.io.Writer w
private org.xml.sax.Locator l
private java.util.Map delayedPrefixes
int curIndent
private int state
private boolean declarating
private boolean indenting
private boolean flushing
private boolean useCDATA
Constructor Detail |
---|
public XblWriterImpl()
Method Detail |
---|
public void setEncoding(java.lang.String pEncoding)
setEncoding
in interface org.apache.ws.commons.serialize.XMLWriter
public java.lang.String getEncoding()
getEncoding
in interface org.apache.ws.commons.serialize.XMLWriter
public void setDeclarating(boolean pDeclarating)
setDeclarating
in interface org.apache.ws.commons.serialize.XMLWriter
public boolean isDeclarating()
isDeclarating
in interface org.apache.ws.commons.serialize.XMLWriter
public void setIndenting(boolean pIndenting)
setIndenting
in interface org.apache.ws.commons.serialize.XMLWriter
public boolean isIndenting()
isIndenting
in interface org.apache.ws.commons.serialize.XMLWriter
public void setIndentString(java.lang.String pIndentString)
setIndentString
in interface org.apache.ws.commons.serialize.XMLWriter
public java.lang.String getIndentString()
getIndentString
in interface org.apache.ws.commons.serialize.XMLWriter
public void setLineFeed(java.lang.String pLineFeed)
setLineFeed
in interface org.apache.ws.commons.serialize.XMLWriter
public java.lang.String getLineFeed()
getLineFeed
in interface org.apache.ws.commons.serialize.XMLWriter
public void setFlushing(boolean pFlushing)
setFlushing
in interface org.apache.ws.commons.serialize.XMLWriter
public boolean isFlushing()
isFlushing
in interface org.apache.ws.commons.serialize.XMLWriter
public void setWriter(java.io.Writer pWriter)
Sets the JaxbXMLSerializers Writer.
setWriter
in interface org.apache.ws.commons.serialize.XMLWriter
public java.io.Writer getWriter()
Returns the JaxbXMLSerializers Writer.
getWriter
in interface org.apache.ws.commons.serialize.XMLWriter
public void setUseCData(boolean use)
public void setDocumentLocator(org.xml.sax.Locator pLocator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
pLocator
- A locator for use in case of errorsgetDocumentLocator()
public org.xml.sax.Locator getDocumentLocator()
setDocumentLocator(org.xml.sax.Locator)
public void startPrefixMapping(java.lang.String prefix, java.lang.String namespaceURI) throws org.xml.sax.SAXException
Starts use of a namespace prefix.
startPrefixMapping
in interface org.xml.sax.ContentHandler
namespaceURI
- The namespace URIprefix
- The prefix
org.xml.sax.SAXException
- Not actually thrown, just for compliance to the interface specification.public void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXException
Terminates use of a namespace prefix.
endPrefixMapping
in interface org.xml.sax.ContentHandler
prefix
- The prefix being abandoned.
org.xml.sax.SAXException
- Not actually thrown, just for compliance to the interface specification.public void startDocument() throws org.xml.sax.SAXException
Starts a document.
startDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
- Not actually thrown, just for compliance to the interface specification.public void endDocument() throws org.xml.sax.SAXException
This method finishs the handlers action. After calling endDocument you may start a new action by calling startDocument again.
endDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
- Not actually thrown, just for compliance to the
interface specification.public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
ch
- A string of whitespace characters being inserted into the document.start
- The index of the first character.length
- The number of characters.
org.xml.sax.SAXException
- Thrown in case of an IOException.private void stopTerminator() throws java.io.IOException
java.io.IOException
public void charactersOrig(char[] ch, int start, int length) throws org.xml.sax.SAXException
ch
- The characters being inserted. A substring, to be precise.start
- Index of the first characterlength
- Number of characters being inserted
org.xml.sax.SAXException
- Thrown in case of an IOExceptionpublic void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
ch
- The characters being inserted. A substring, to be precise.start
- Index of the first characterlength
- Number of characters being inserted
org.xml.sax.SAXException
- Thrown in case of an IOExceptionpublic boolean canEncode(char c)
canEncode
in interface org.apache.ws.commons.serialize.XMLWriter
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
Terminates an element.
endElement
in interface org.xml.sax.ContentHandler
namespaceURI
- The namespace URI, if any, or nulllocalName
- The local name, without prefix, or nullqName
- The qualified name, including a prefix, or null
org.xml.sax.SAXException
- Thrown in case of an IOException.private void indentMe() throws java.io.IOException
java.io.IOException
private final boolean needsEncoding(java.lang.String txt)
private void wrapWithCDATAIfNecessary(char[] ch, int start, int length, java.io.Writer wr) throws java.io.IOException, org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
private void writeCData(java.lang.String v) throws java.io.IOException
java.io.IOException
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attr) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
namespaceURI
- The namespace URI, if any, or nulllocalName
- The local name, without prefix, or nullqName
- The qualified name, including a prefix, or nullattr
- The element attributes
org.xml.sax.SAXException
- Thrown in case of an IOException.public void skippedEntity(java.lang.String ent) throws org.xml.sax.SAXException
skippedEntity
in interface org.xml.sax.ContentHandler
ent
- The entity being skipped.
org.xml.sax.SAXException
- Not actually thrown, just for compliance to the interface specification.public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
target
- The PI targetdata
- The PI data
org.xml.sax.SAXException
- Thrown in case of an IOException
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |