CharsetDecoder.Flush(CharBuffer) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Flushes this decoder.
[Android.Runtime.Register("flush", "(Ljava/nio/CharBuffer;)Ljava/nio/charset/CoderResult;", "")]
public Java.Nio.Charset.CoderResult? Flush (Java.Nio.CharBuffer? out);
[<Android.Runtime.Register("flush", "(Ljava/nio/CharBuffer;)Ljava/nio/charset/CoderResult;", "")>]
member this.Flush : Java.Nio.CharBuffer -> Java.Nio.Charset.CoderResult
Parameters
- out
- CharBuffer
The output character buffer
Returns
A coder-result object, either CoderResult#UNDERFLOW
or
CoderResult#OVERFLOW
- Attributes
Exceptions
if this decoder isn't already flushed or at end of input.
Remarks
Flushes this decoder.
Some decoders maintain internal state and may need to write some final characters to the output buffer once the overall input sequence has been read.
Any additional output is written to the output buffer beginning at its current position. At most Buffer#remaining out.remaining()
characters will be written. The buffer's position will be advanced appropriately, but its mark and limit will not be modified.
If this method completes successfully then it returns CoderResult#UNDERFLOW
. If there is insufficient room in the output buffer then it returns CoderResult#OVERFLOW
. If this happens then this method must be invoked again, with an output buffer that has more room, in order to complete the current decoding operation.
If this decoder has already been flushed then invoking this method has no effect.
This method invokes the #implFlush implFlush
method to perform the actual flushing operation.
Java documentation for java.nio.charset.CharsetDecoder.flush(java.nio.CharBuffer)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.