OutputStream to a Writer by decoding the data
using the specified Charset.Note
This class should only be used if it is necessary to
redirect an OutputStream to a Writer for compatibility
purposes. It is much more efficient to write to the Writer
directly.
| Modifier and Type | Field and Description |
|---|---|
| private final CharsetDecoder | |
| private final ByteBuffer | |
| private final CharBuffer | |
| private final Writer |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. Closes this output stream and releases any system resources associated with this stream. |
| public void | flush()
Overrides java. Implements java. Flushes this output stream and forces any buffered output bytes to be written out. |
| private void | |
| private void | processInput(final boolean
indicates end of input endOfInput)Decode the contents of the input ByteBuffer into a CharBuffer. |
| public void | write(int b)
Implements abstract java. Writes the specified byte to this output stream. |
| public void | write(byte[] b)
Overrides java. Writes |
| public void | write(byte[] b, int off, int len)
Overrides java. Writes |
| decoder | back to summary |
|---|---|
| private final CharsetDecoder decoder | |
| decoderIn | back to summary |
|---|---|
| private final ByteBuffer decoderIn | |
| decoderOut | back to summary |
|---|---|
| private final CharBuffer decoderOut | |
| out | back to summary |
|---|---|
| private final Writer out | |
| WriterOutputStream | back to summary |
|---|---|
| public WriterOutputStream(Writer out, Charset charset) | |
| WriterOutputStream | back to summary |
|---|---|
| public WriterOutputStream(Writer out, CharsetDecoder decoder) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this output stream and releases any system resources
associated with this stream. The general contract of
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Overrides java. Implements java. Doc from java. Flushes this output stream and forces any buffered output bytes
to be written out. The general contract of If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
| |
| flushOutput | back to summary |
|---|---|
| private void flushOutput() throws IOException Flush the output.
| |
| processInput | back to summary |
|---|---|
| private void processInput(final boolean endOfInput) throws IOException Decode the contents of the input ByteBuffer into a CharBuffer.
| |
| write | back to summary |
|---|---|
| public void write(int b) throws IOException Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |
| write | back to summary |
|---|---|
| public void write(byte[] b) throws IOException Overrides java. Doc from java. Writes
| |
| write | back to summary |
|---|---|
| public void write(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Writes
If
If
| |