Java.Nio.Charset.CharsetDecoder.Flush Method
Flushes this decoder.

Syntax

[Android.Runtime.Register("flush", "(Ljava/nio/CharBuffer;)Ljava/nio/charset/CoderResult;", "")]
public CoderResult Flush (Java.Nio.CharBuffer out)

Parameters

out
the given output buffer.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.IllegalStateExceptionif this decoder isn't already flushed or at end of input.

Remarks

Flushes this decoder. This method will call CharsetDecoder.ImplFlush(Java.Nio.CharBuffer). Some decoders may need to write some characters to the output buffer when they have read all input bytes; subclasses can override CharsetDecoder.ImplFlush(Java.Nio.CharBuffer) to perform the writing operation.

The maximum number of written bytes won't be larger than Java.Nio.Buffer.Remaining. If some decoder wants to write more bytes than an output buffer's remaining space allows, then a CoderResult.OVERFLOW will be returned, and this method must be called again with a character buffer that has more remaining space. Otherwise this method will return CoderResult.UNDERFLOW, which means one decoding process has been completed successfully.

During the flush, the output buffer's position will be changed accordingly, while its mark and limit will be intact.

[Android Documentation]

Requirements

Namespace: Java.Nio.Charset
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1