freemind.main
Class XHTMLWriter.XHTMLFilterWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.FilterWriter
          extended by freemind.main.XHTMLWriter.XHTMLFilterWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable
Enclosing class:
XHTMLWriter

public static class XHTMLWriter.XHTMLFilterWriter
extends java.io.FilterWriter

This FilterWriter will convert the output of Swing's HTMLWriter to XHTML format. This is done by converting tags like <br> to <br />. Also, special characters in tag attributes are escaped.

This filter relies on known flaws of the HTMLWriter. It is known to work with Java 1.4, but might not work with future Java releases.


Field Summary
 
Fields inherited from class java.io.FilterWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
XHTMLWriter.XHTMLFilterWriter(java.io.Writer writer)
          Create a new XHTMLFilterWriter.
 
Method Summary
 void write(char[] cbuf, int off, int len)
          Write a char array to the Writer.
 void write(int c)
          Write a single char to the Writer.
 void write(java.lang.String str, int off, int len)
          Write a String to the Writer.
 
Methods inherited from class java.io.FilterWriter
close, flush
 
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
 

Constructor Detail

XHTMLWriter.XHTMLFilterWriter

public XHTMLWriter.XHTMLFilterWriter(java.io.Writer writer)
Create a new XHTMLFilterWriter.

Parameters:
writer - Writer to write to
Method Detail

write

public void write(int c)
           throws java.io.IOException
Write a single char to the Writer.

Overrides:
write in class java.io.FilterWriter
Parameters:
c - Char to be written
Throws:
java.io.IOException

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws java.io.IOException
Write a char array to the Writer.

Overrides:
write in class java.io.FilterWriter
Parameters:
cbuf - Char array to be written
off - Start offset within the array
len - Number of chars to be written
Throws:
java.io.IOException

write

public void write(java.lang.String str,
                  int off,
                  int len)
           throws java.io.IOException
Write a String to the Writer.

Overrides:
write in class java.io.FilterWriter
Parameters:
str - String to be written
off - Start offset within the String
len - Number of chars to be written
Throws:
java.io.IOException