mondrian.xmla.impl
Class DefaultSaxWriter

java.lang.Object
  extended by mondrian.xmla.impl.DefaultSaxWriter
All Implemented Interfaces:
SaxWriter

public class DefaultSaxWriter
extends Object
implements SaxWriter

Default implementation of SaxWriter.

Since:
27 April, 2003
Author:
jhyde, Gang Chen
 

Nested Class Summary
static class DefaultSaxWriter.StringAttributes
          List of SAX attributes based upon a string array.
 
Constructor Summary
DefaultSaxWriter(OutputStream stream)
          Creates a SAXWriter writing to an OutputStream.
DefaultSaxWriter(OutputStream stream, String xmlEncoding)
           
DefaultSaxWriter(PrintWriter writer, int initialIndent)
          Creates a SAXWriter writing to a PrintWriter.
DefaultSaxWriter(Writer writer)
          Creates a SAXWriter writing to a Writer.
 
Method Summary
 void characters(String s)
           
 void completeBeforeElement(String tagName)
           
 void element(String tagName, String[] attributes)
           
 void endDocument()
           
 void endElement()
           
 void flush()
          Flushes any unwritten output.
 void startDocument()
           
 void startElement(String tagName)
           
 void startElement(String tagName, String[] attributes)
           
 void verbatim(String text)
          Sends a piece of text verbatim through the writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSaxWriter

public DefaultSaxWriter(OutputStream stream)
Creates a SAXWriter writing to an OutputStream.


DefaultSaxWriter

public DefaultSaxWriter(OutputStream stream,
                        String xmlEncoding)
                 throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

DefaultSaxWriter

public DefaultSaxWriter(Writer writer)
Creates a SAXWriter writing to a Writer.

If writer is a PrintWriter, DefaultSaxWriter(java.io.OutputStream) is preferred.


DefaultSaxWriter

public DefaultSaxWriter(PrintWriter writer,
                        int initialIndent)
Creates a SAXWriter writing to a PrintWriter.

Parameters:
writer -
initialIndent -
Method Detail

characters

public void characters(String s)
Specified by:
characters in interface SaxWriter

element

public void element(String tagName,
                    String[] attributes)
Specified by:
element in interface SaxWriter

startElement

public void startElement(String tagName)
Specified by:
startElement in interface SaxWriter

startElement

public void startElement(String tagName,
                         String[] attributes)
Specified by:
startElement in interface SaxWriter

endElement

public void endElement()
Specified by:
endElement in interface SaxWriter

startDocument

public void startDocument()
Specified by:
startDocument in interface SaxWriter

endDocument

public void endDocument()
Specified by:
endDocument in interface SaxWriter

completeBeforeElement

public void completeBeforeElement(String tagName)
Specified by:
completeBeforeElement in interface SaxWriter

verbatim

public void verbatim(String text)
Description copied from interface: SaxWriter
Sends a piece of text verbatim through the writer. It must be a piece of well-formed XML.

Specified by:
verbatim in interface SaxWriter

flush

public void flush()
Description copied from interface: SaxWriter
Flushes any unwritten output.

Specified by:
flush in interface SaxWriter

SourceForge.net_Logo