org.xwiki.rendering.internal.renderer.printer
Class WikiWriter

java.lang.Object
  extended by java.io.Writer
      extended by org.xwiki.rendering.internal.renderer.printer.WikiWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class WikiWriter
extends java.io.Writer

Bridge so that WikiPrinter can be used in a tools supporting Writer api.

Version:
$Id$

Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
WikiWriter(WikiPrinter printer)
           
 
Method Summary
 void close()
          
 void flush()
          
 WikiPrinter getWikiPrinter()
           
 void setWikiPrinter(WikiPrinter printer)
           
 void write(char[] cbuf, int off, int len)
          
 void write(java.lang.String str)
          
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WikiWriter

public WikiWriter(WikiPrinter printer)
Method Detail

setWikiPrinter

public void setWikiPrinter(WikiPrinter printer)

getWikiPrinter

public WikiPrinter getWikiPrinter()

close

public void close()
           throws java.io.IOException

Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Writer
Throws:
java.io.IOException
See Also:
Writer.close()

flush

public void flush()
           throws java.io.IOException

Specified by:
flush in interface java.io.Flushable
Specified by:
flush in class java.io.Writer
Throws:
java.io.IOException
See Also:
Writer.flush()

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws java.io.IOException

Specified by:
write in class java.io.Writer
Throws:
java.io.IOException
See Also:
Writer.write(char[], int, int)

write

public void write(java.lang.String str)
           throws java.io.IOException

Override it to improve speed a little. Otherwise the String is transformed in char table passed to the over methods which recreate a String.

Overrides:
write in class java.io.Writer
Throws:
java.io.IOException
See Also:
Writer.write(java.lang.String)


Copyright © 2004-2011 XWiki. All Rights Reserved.