Package org.identityconnectors.common
Class StringPrintWriter
- java.lang.Object
-
- java.io.Writer
-
- java.io.PrintWriter
-
- org.identityconnectors.common.StringPrintWriter
-
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
public class StringPrintWriter extends PrintWriter
Simple extension of PrintWriter so you don't have to create a StringWriter to pass to it, when you want the functionality of PrintWriter but you want it in a buffer.
-
-
Field Summary
-
Fields inherited from class java.io.PrintWriter
out
-
-
Constructor Summary
Constructors Constructor Description StringPrintWriter()
Create with the default initial size.StringPrintWriter(int initSize)
Create with an initialize size with the parameter supplied..
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear out the underlying string writer.Reader
getReader()
Return a reader for the accumulated string.String
getString()
Return the string in the internal string writer.void
print(String[] value)
Call print for every string in the array.void
println(String[] value)
Call println for every string in the array.-
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.io.Writer
nullWriter
-
-
-
-
Method Detail
-
getString
public String getString()
Return the string in the internal string writer.
-
getReader
public Reader getReader()
Return a reader for the accumulated string.
-
println
public void println(String[] value)
Call println for every string in the array.
-
print
public void print(String[] value)
Call print for every string in the array.- Throws:
NullPointerException
- if value is null.
-
clear
public void clear()
Clear out the underlying string writer.
-
-