public interface NuCharsetDecoderHandler
NuCharsetDecoder
with decoded string data.NuProcessHandler
Modifier and Type | Method and Description |
---|---|
void |
onDecode(CharBuffer buffer,
boolean closed,
CoderResult decoderResult)
This method is invoked when there is decoded data to process or an the
end-of-file (EOF) condition has been reached.
|
void onDecode(CharBuffer buffer, boolean closed, CoderResult decoderResult)
closed
parameter will be true
; this is your signal that
EOF has been reached.
You do not own the CharBuffer
provided to you. You should not
retain a reference to this buffer.
Upon returning from this method, if any characters are left in the buffer
(i.e., buffer.hasRemaining()
returns true
), then the
buffer will be compacted
after returning. Any
unused data will be kept at the start of the buffer and passed back to you
as part of the next invocation of this method (which might be when EOF is
reached and closed
is true
).
Exceptions thrown out from your method will be ignored, but your method should handle all exceptions itself.
buffer
- a CharBuffer
containing received and decoded dataclosed
- true
if EOF has been reacheddecoderResult
- a CoderResult
signifying whether an error was
encountered decoding stdout bytesCopyright © 2015 Zaxxer.com. All rights reserved.