CoderResult Class

Definition

A description of the result state of a coder.

[Android.Runtime.Register("java/nio/charset/CoderResult", DoNotGenerateAcw=true)]
public class CoderResult : Java.Lang.Object
[<Android.Runtime.Register("java/nio/charset/CoderResult", DoNotGenerateAcw=true)>]
type CoderResult = class
    inherit Object
Inheritance
CoderResult
Attributes

Remarks

A description of the result state of a coder.

A charset coder, that is, either a decoder or an encoder, consumes bytes (or characters) from an input buffer, translates them, and writes the resulting characters (or bytes) to an output buffer. A coding process terminates for one of four categories of reasons, which are described by instances of this class:

<ul>

<li>

Underflow is reported when there is no more input to be processed, or there is insufficient input and additional input is required. This condition is represented by the unique result object #UNDERFLOW, whose #isUnderflow() isUnderflow method returns true.

</li>

<li>

Overflow is reported when there is insufficient room remaining in the output buffer. This condition is represented by the unique result object #OVERFLOW, whose #isOverflow() isOverflow method returns true.

</li>

<li>

A malformed-input error is reported when a sequence of input units is not well-formed. Such errors are described by instances of this class whose #isMalformed() isMalformed method returns true and whose #length() length method returns the length of the malformed sequence. There is one unique instance of this class for all malformed-input errors of a given length.

</li>

<li>

An unmappable-character error is reported when a sequence of input units denotes a character that cannot be represented in the output charset. Such errors are described by instances of this class whose #isUnmappable() isUnmappable method returns true and whose #length() length method returns the length of the input sequence denoting the unmappable character. There is one unique instance of this class for all unmappable-character errors of a given length.

</li>

</ul>

For convenience, the #isError() isError method returns true for result objects that describe malformed-input and unmappable-character errors but false for those that describe underflow or overflow conditions.

Added in 1.4.

Java documentation for java.nio.charset.CoderResult.

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.

Constructors

CoderResult(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsError

Tells whether or not this object describes an error condition.

IsMalformed

Tells whether or not this object describes a malformed-input error.

IsOverflow

Tells whether or not this object describes an overflow condition.

IsUnderflow

Tells whether or not this object describes an underflow condition.

IsUnmappable

Tells whether or not this object describes an unmappable-character error.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Overflow

Result object indicating overflow, meaning that there is insufficient room in the output buffer.

PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Underflow

Result object indicating underflow, meaning that either the input buffer has been completely consumed or, if the input buffer is not yet empty, that additional input is required.

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Length()

Returns the length of the erroneous input described by this object&nbsp;&nbsp;(optional operation).

MalformedForLength(Int32)

Static factory method that returns the unique object describing a malformed-input error of the given length.

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ThrowException()

Throws an exception appropriate to the result described by this object.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnmappableForLength(Int32)

Static factory method that returns the unique result object describing an unmappable-character error of the given length.

UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to