org.sonatype.sisu.goodies.common.io
Class PrintBuffer

java.lang.Object
  extended by java.io.Writer
      extended by java.io.PrintWriter
          extended by org.sonatype.sisu.goodies.common.io.PrintBuffer
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class PrintBuffer
extends PrintWriter

String-based PrintWriter backed by StringBuilderWriter.

Since:
1.0

Field Summary
 
Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
PrintBuffer()
           
 
Method Summary
 PrintBuffer formatln(String format, Object... args)
           
 StringBuilder getBuffer()
           
 void reset()
           
 String toString()
           
 
Methods inherited from class java.io.PrintWriter
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrintBuffer

public PrintBuffer()
Method Detail

getBuffer

public StringBuilder getBuffer()

formatln

public PrintBuffer formatln(String format,
                            Object... args)
Since:
1.1

reset

public void reset()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2012 Sonatype, Inc.. All Rights Reserved.