Package org.identityconnectors.common
Class StringPrintWriter
- java.lang.Object
-
- java.io.Writer
-
- java.io.PrintWriter
-
- org.identityconnectors.common.StringPrintWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.Appendable
,java.lang.AutoCloseable
public class StringPrintWriter extends java.io.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.
-
-
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.java.io.Reader
getReader()
Return a reader for the accumulated string.java.lang.String
getString()
Return the string in the internal string writer.void
print(java.lang.String[] value)
Call print for every string in the array.void
println(java.lang.String[] value)
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
-
-
-
-
Method Detail
-
getString
public java.lang.String getString()
Return the string in the internal string writer.
-
getReader
public java.io.Reader getReader()
Return a reader for the accumulated string.
-
println
public void println(java.lang.String[] value)
Call println for every string in the array.
-
print
public void print(java.lang.String[] value)
Call print for every string in the array.- Throws:
java.lang.NullPointerException
- if value is null.
-
clear
public void clear()
Clear out the underlying string writer.
-
-