org.activemath.util
Class ProtectedUTF8XMLWriter

java.lang.Object
  extended by java.io.Writer
      extended by org.activemath.util.MyUTF8XMLWriter
          extended by org.activemath.util.ProtectedUTF8XMLWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable
Direct Known Subclasses:
PrettyUTF8XMLWriter

public class ProtectedUTF8XMLWriter
extends MyUTF8XMLWriter

A class to protected the call to attribute against null attributes, often found by surprise. A call to attribute("someString",null) will write the attribute someString="xx" where xx is defined by the nullString variable.


Field Summary
 String nullString
           
 
Fields inherited from class org.activemath.util.MyUTF8XMLWriter
escapedLineSeparator, lineSeparator, MINIMIZE_EMPTY_ELEMENTS, MINIMIZE_EMPTY_ELEMENTS_HTML, sysLineSeparator
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
ProtectedUTF8XMLWriter(OutputStream s)
           
 
Method Summary
 void attribute(String name, String content)
           
 void markup(String t)
           
 
Methods inherited from class org.activemath.util.MyUTF8XMLWriter
cdataSection, characterReference, close, comment, endAttribute, endElement, endReplacementText, entityReference, flush, newLine, processingInstruction, startAttribute, startElement, startReplacementText, write, write, write, write, writeRaw, writeUTF8
 
Methods inherited from class java.io.Writer
append, append, append, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nullString

public String nullString
Constructor Detail

ProtectedUTF8XMLWriter

public ProtectedUTF8XMLWriter(OutputStream s)
Method Detail

markup

public void markup(String t)
            throws IOException
Overrides:
markup in class MyUTF8XMLWriter
Throws:
IOException

attribute

public void attribute(String name,
                      String content)
               throws IOException
Overrides:
attribute in class MyUTF8XMLWriter
Throws:
IOException