| Constructor and Description |
|---|
StreamSink(OutputStream output)
Construct a StreamSink for a byte stream.
|
StreamSink(OutputStream output,
String encoding)
Construct a StreamSink for a byte stream with the specified
encoding. |
StreamSink(Writer writer)
Construct a StreamSink for a character stream.
|
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
getOutputStream()
Returns an
OutputStream suitable for writing binary data. |
Writer |
getWriter()
Returns a
Writer object that can send character text. |
public StreamSink(OutputStream output)
output - public StreamSink(OutputStream output, String encoding)
encoding.
The encoding is used when getWriter() is invoked to create a
writer from the underlying byte stream.output - encoding - public StreamSink(Writer writer)
writer - public OutputStream getOutputStream() throws IOException
OutputStream suitable for writing binary data.
Either this method or getWriter() may be called to write the body, not both.
getOutputStream in interface SinkIOExceptionpublic Writer getWriter() throws IOException
Writer object that can send character text.
Either this method or getOutputStream() may be called to write the body, not both.
getWriter in interface SinkIOExceptionCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.