public class StringBuilderOutput extends AbstractRockerOutput<StringBuilderOutput>
StringBuilder. Optimized for writing
Strings vs. Bytes. Bytes are converted to Strings using the specified charset
on each write.| Modifier and Type | Field and Description |
|---|---|
static RockerOutputFactory<StringBuilderOutput> |
FACTORY |
byteLength, charset, contentType| Constructor and Description |
|---|
StringBuilderOutput(ContentType contentType,
Charset charset) |
StringBuilderOutput(ContentType contentType,
Charset charset,
int intialSize) |
StringBuilderOutput(ContentType contentType,
String charsetName) |
StringBuilderOutput(ContentType contentType,
String charsetName,
int intialSize) |
| Modifier and Type | Method and Description |
|---|---|
StringBuilder |
getBuffer() |
String |
toString() |
StringBuilderOutput |
w(byte[] bytes) |
StringBuilderOutput |
w(String string)
Writes a String to the output.
|
getByteLength, getCharset, getContentTypepublic static RockerOutputFactory<StringBuilderOutput> FACTORY
public StringBuilderOutput(ContentType contentType, String charsetName)
public StringBuilderOutput(ContentType contentType, String charsetName, int intialSize)
public StringBuilderOutput(ContentType contentType, Charset charset)
public StringBuilderOutput(ContentType contentType, Charset charset, int intialSize)
public StringBuilder getBuffer()
public StringBuilderOutput w(String string) throws IOException
RockerOutputstring - The string to writeIOException - Thrown on exception.public StringBuilderOutput w(byte[] bytes) throws IOException
IOExceptionpublic String toString()
toString in interface RockerOutput<AbstractRockerOutput>toString in class ObjectCopyright © 2016–2020 Fizzed, Inc. All rights reserved.