Reusable Java library of general tools with minimal external dependencies.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://www.aoindustries.com/contact
public class StringBuilderWriter extends Writer
Writer that buffers its content into a StringBuilder.
This implementation is completely unsynchronized. Every method of Writer
that uses lock has been overridden to ensure this.| Constructor and Description |
|---|
StringBuilderWriter() |
StringBuilderWriter(int initialCapacity) |
StringBuilderWriter(StringBuilder buffer) |
| Modifier and Type | Method and Description |
|---|---|
StringBuilderWriter |
append(char c) |
StringBuilderWriter |
append(CharSequence csq) |
StringBuilderWriter |
append(CharSequence csq,
int start,
int end) |
void |
close()
Does nothing on close.
|
void |
flush()
Does nothing on flush.
|
StringBuilder |
getBuffer()
Gets the
StringBuilder used as the buffer. |
String |
toString()
Gets the captured body as a String.
|
void |
write(char[] cbuf) |
void |
write(char[] cbuf,
int off,
int len) |
void |
write(int c) |
void |
write(String str) |
void |
write(String str,
int off,
int len) |
public StringBuilderWriter()
public StringBuilderWriter(int initialCapacity)
public StringBuilderWriter(StringBuilder buffer)
public StringBuilderWriter append(CharSequence csq)
append in interface Appendableappend in class Writerpublic StringBuilderWriter append(CharSequence csq, int start, int end)
append in interface Appendableappend in class Writerpublic StringBuilderWriter append(char c)
append in interface Appendableappend in class Writerpublic void flush()
public void close()
public StringBuilder getBuffer()
StringBuilder used as the buffer.Copyright © 2000–2016 AO Industries, Inc.. All rights reserved.