public final class NuCharsetDecoder extends Object
NuProcessHandler.onStdout(ByteBuffer, boolean) or
NuProcessHandler.onStderr(ByteBuffer, boolean) which handles decoding
of stdout or stderr bytes to Java UTF-16 string data.
Calls back into a NuCharsetDecoderHandler with decoded stdout or
stderr string data.
This class is not intended to be subclassed.| Constructor and Description |
|---|
NuCharsetDecoder(NuCharsetDecoderHandler handler,
Charset charset)
Creates a decoder which uses a single
Charset to decode output
data. |
NuCharsetDecoder(NuCharsetDecoderHandler handler,
CharsetDecoder decoder)
Creates a decoder which uses a
CharsetDecoders to
decode output data. |
| Modifier and Type | Method and Description |
|---|---|
void |
onOutput(ByteBuffer buffer,
boolean closed)
Implementation of
NuProcessHandler.onStdout(ByteBuffer, boolean)
or NuProcessHandler.onStderr(ByteBuffer, boolean) which decodes
output data and forwards it to handler. |
public NuCharsetDecoder(NuCharsetDecoderHandler handler, Charset charset)
Charset to decode output
data.handler - NuCharsetDecoderHandler called back with decoded
string datacharset - Charset used to decode output datapublic NuCharsetDecoder(NuCharsetDecoderHandler handler, CharsetDecoder decoder)
CharsetDecoders to
decode output data.handler - NuCharsetDecoderHandler called back with decoded
string datadecoder - CharsetDecoder used to decode stdout bytes to
string datapublic void onOutput(ByteBuffer buffer, boolean closed)
NuProcessHandler.onStdout(ByteBuffer, boolean)
or NuProcessHandler.onStderr(ByteBuffer, boolean) which decodes
output data and forwards it to handler.buffer - ByteBuffer which received bytes from stdout or
stderrclosed - true if stdout or stderr was closed, false otherwiseCopyright © 2015 Zaxxer.com. All rights reserved.