Class DefaultWikiPrinter
- java.lang.Object
-
- org.xwiki.rendering.renderer.printer.DefaultWikiPrinter
-
- All Implemented Interfaces:
WikiPrinter
public class DefaultWikiPrinter extends Object implements WikiPrinter
Printer using aStringBuffer
as the underlying output target.- Since:
- 1.6M1
- Version:
- $Id: 4f0769c6cf8b069a824c7bf4ff363de8196e8225 $
-
-
Constructor Summary
Constructors Constructor Description DefaultWikiPrinter()
The default constructor.DefaultWikiPrinter(StringBuffer buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Removes the buffer's content which allows the printer to be reused.StringBuffer
getBuffer()
protected String
getEOL()
This method is protected to allow classes extending this one to override what a new line is.void
print(String text)
void
println(String text)
String
toString()
-
-
-
Constructor Detail
-
DefaultWikiPrinter
public DefaultWikiPrinter()
The default constructor. It initialize a new emptyStringBuffer
.
-
DefaultWikiPrinter
public DefaultWikiPrinter(StringBuffer buffer)
- Parameters:
buffer
- theStringBuffer
to where to put the providedString
s.
-
-
Method Detail
-
getBuffer
public StringBuffer getBuffer()
- Returns:
- the buffer containing the printed
String
s.
-
getEOL
protected String getEOL()
This method is protected to allow classes extending this one to override what a new line is.- Returns:
- a new line symbols
-
print
public void print(String text)
- Specified by:
print
in interfaceWikiPrinter
- Parameters:
text
- print the providedString
.
-
println
public void println(String text)
- Specified by:
println
in interfaceWikiPrinter
- Parameters:
text
- print the providedString
and add a new line.
-
clear
public void clear()
Removes the buffer's content which allows the printer to be reused.
-
-