public class OutputStreamOutput extends AbstractRockerOutput<OutputStreamOutput>
OutputStream. Optimized for writing bytes
vs. Strings. Strings are converted to bytes using the specified charset on
each write.byteLength, charset, contentType| Constructor and Description |
|---|
OutputStreamOutput(ContentType contentType,
OutputStream stream,
Charset charset) |
OutputStreamOutput(ContentType contentType,
OutputStream stream,
String charsetName) |
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
getStream() |
OutputStreamOutput |
w(byte[] bytes) |
OutputStreamOutput |
w(String string)
Writes a String to the output.
|
getByteLength, getCharset, getContentTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoStringpublic OutputStreamOutput(ContentType contentType, OutputStream stream, String charsetName)
public OutputStreamOutput(ContentType contentType, OutputStream stream, Charset charset)
public OutputStream getStream()
public OutputStreamOutput w(String string) throws IOException
RockerOutputstring - The string to writeIOException - Thrown on exception.public OutputStreamOutput w(byte[] bytes) throws IOException
IOExceptionCopyright © 2016–2020 Fizzed, Inc. All rights reserved.