xmlBlaster 2.2.0 client API

org.xmlBlaster.util.protocol.xmlrpc
Class XblWriterImpl

java.lang.Object
  extended by org.xmlBlaster.util.protocol.xmlrpc.XblWriterImpl
All Implemented Interfaces:
org.apache.ws.commons.serialize.XMLWriter, org.xml.sax.ContentHandler

public class XblWriterImpl
extends java.lang.Object
implements org.apache.ws.commons.serialize.XMLWriter

Default implementation of XMLWriter. Works with Java 1.2 and later.


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.
 boolean isDeclarating()
           
 boolean isFlushing()
           
 boolean isIndenting()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XblWriterImpl

public XblWriterImpl()
Method Detail

setEncoding

public void setEncoding(java.lang.String pEncoding)
Specified by:
setEncoding in interface org.apache.ws.commons.serialize.XMLWriter

getEncoding

public java.lang.String getEncoding()
Specified by:
getEncoding in interface org.apache.ws.commons.serialize.XMLWriter

setDeclarating

public void setDeclarating(boolean pDeclarating)
Specified by:
setDeclarating in interface org.apache.ws.commons.serialize.XMLWriter

isDeclarating

public boolean isDeclarating()
Specified by:
isDeclarating in interface org.apache.ws.commons.serialize.XMLWriter

setIndenting

public void setIndenting(boolean pIndenting)
Specified by:
setIndenting in interface org.apache.ws.commons.serialize.XMLWriter

isIndenting

public boolean isIndenting()
Specified by:
isIndenting in interface org.apache.ws.commons.serialize.XMLWriter

setIndentString

public void setIndentString(java.lang.String pIndentString)
Specified by:
setIndentString in interface org.apache.ws.commons.serialize.XMLWriter

getIndentString

public java.lang.String getIndentString()
Specified by:
getIndentString in interface org.apache.ws.commons.serialize.XMLWriter

setLineFeed

public void setLineFeed(java.lang.String pLineFeed)
Specified by:
setLineFeed in interface org.apache.ws.commons.serialize.XMLWriter

getLineFeed

public java.lang.String getLineFeed()
Specified by:
getLineFeed in interface org.apache.ws.commons.serialize.XMLWriter

setFlushing

public void setFlushing(boolean pFlushing)
Specified by:
setFlushing in interface org.apache.ws.commons.serialize.XMLWriter

isFlushing

public boolean isFlushing()
Specified by:
isFlushing in interface org.apache.ws.commons.serialize.XMLWriter

setWriter

public void setWriter(java.io.Writer pWriter)

Sets the JaxbXMLSerializers Writer.

Specified by:
setWriter in interface org.apache.ws.commons.serialize.XMLWriter

getWriter

public java.io.Writer getWriter()

Returns the JaxbXMLSerializers Writer.

Specified by:
getWriter in interface org.apache.ws.commons.serialize.XMLWriter

setUseCData

public void setUseCData(boolean use)

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator pLocator)
Sets the locator.

Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
Parameters:
pLocator - A locator for use in case of errors
See Also:
getDocumentLocator()

getDocumentLocator

public org.xml.sax.Locator getDocumentLocator()
Returns the locator

Returns:
A locator previously set with setDocumentLocator or null.
See Also:
setDocumentLocator(org.xml.sax.Locator)

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String namespaceURI)
                        throws org.xml.sax.SAXException

Starts use of a namespace prefix.

Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler
Parameters:
namespaceURI - The namespace URI
prefix - The prefix
Throws:
org.xml.sax.SAXException - Not actually thrown, just for compliance to the interface specification.

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
                      throws org.xml.sax.SAXException

Terminates use of a namespace prefix.

Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler
Parameters:
prefix - The prefix being abandoned.
Throws:
org.xml.sax.SAXException - Not actually thrown, just for compliance to the interface specification.

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException

Starts a document.

Specified by:
startDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException - Not actually thrown, just for compliance to the interface specification.

endDocument

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.

Specified by:
endDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException - Not actually thrown, just for compliance to the interface specification.

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws org.xml.sax.SAXException
Calls the character method with the same arguments.

Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler
Parameters:
ch - A string of whitespace characters being inserted into the document.
start - The index of the first character.
length - The number of characters.
Throws:
org.xml.sax.SAXException - Thrown in case of an IOException.

charactersOrig

public void charactersOrig(char[] ch,
                           int start,
                           int length)
                    throws org.xml.sax.SAXException
Inserts a string of characters into the document.

Parameters:
ch - The characters being inserted. A substring, to be precise.
start - Index of the first character
length - Number of characters being inserted
Throws:
org.xml.sax.SAXException - Thrown in case of an IOException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Inserts a string of characters into the document.

Specified by:
characters in interface org.xml.sax.ContentHandler
Parameters:
ch - The characters being inserted. A substring, to be precise.
start - Index of the first character
length - Number of characters being inserted
Throws:
org.xml.sax.SAXException - Thrown in case of an IOException

canEncode

public boolean canEncode(char c)
Specified by:
canEncode in interface org.apache.ws.commons.serialize.XMLWriter

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException

Terminates an element.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Parameters:
namespaceURI - The namespace URI, if any, or null
localName - The local name, without prefix, or null
qName - The qualified name, including a prefix, or null
Throws:
org.xml.sax.SAXException - Thrown in case of an IOException.

startElement

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
Starts a new element.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Parameters:
namespaceURI - The namespace URI, if any, or null
localName - The local name, without prefix, or null
qName - The qualified name, including a prefix, or null
attr - The element attributes
Throws:
org.xml.sax.SAXException - Thrown in case of an IOException.

skippedEntity

public void skippedEntity(java.lang.String ent)
                   throws org.xml.sax.SAXException
Not actually implemented, because I don't know how to skip entities.

Specified by:
skippedEntity in interface org.xml.sax.ContentHandler
Parameters:
ent - The entity being skipped.
Throws:
org.xml.sax.SAXException - Not actually thrown, just for compliance to the interface specification.

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Inserts a processing instruction.

Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
Parameters:
target - The PI target
data - The PI data
Throws:
org.xml.sax.SAXException - Thrown in case of an IOException

xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.