public class BoundedStringWriter extends Writer
Constructor and Description |
---|
BoundedStringWriter(PrintStream outputSink,
int maxSize)
Create a new bounded string writer using the default maximum size.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closing a BoundedStringWriter has no effect.
|
void |
flush()
Flush the stream.
|
StringBuilder |
getBuilder()
Return the string builder itself.
|
void |
setContentBuffer(StringBuilder builder) |
String |
toString() |
void |
write(char[] c,
int off,
int len) |
public BoundedStringWriter(PrintStream outputSink, int maxSize)
public void setContentBuffer(StringBuilder builder)
public StringBuilder getBuilder()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Writer
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class Writer
IOException