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
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.
-
Constructor Summary
ConstructorDescriptionCreate with the default initial size.StringPrintWriter
(int initSize) Create with an initialize size with the parameter supplied.. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear out the underlying string writer.Return a reader for the accumulated string.Return the string in the internal string writer.void
Call print for every string in the array.void
Call println for every string in the array.Methods inherited from class java.io.PrintWriter
append, append, append, checkError, 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, write, write, write, write, write
Methods inherited from class java.io.Writer
nullWriter
-
Constructor Details
-
StringPrintWriter
public StringPrintWriter()Create with the default initial size. -
StringPrintWriter
public StringPrintWriter(int initSize) Create with an initialize size with the parameter supplied..
-
-
Method Details
-
getString
Return the string in the internal string writer. -
getReader
Return a reader for the accumulated string. -
println
Call println for every string in the array. -
print
Call print for every string in the array.- Throws:
NullPointerException
- if value is null.
-
clear
public void clear()Clear out the underlying string writer.
-