Udostępnij za pośrednictwem


CharsetDecoder.IsCharsetDetected Property

Definition

Tells whether or not this decoder has yet detected a charset  (optional operation).

public virtual bool IsCharsetDetected { [Android.Runtime.Register("isCharsetDetected", "()Z", "GetIsCharsetDetectedHandler")] get; }
[<get: Android.Runtime.Register("isCharsetDetected", "()Z", "GetIsCharsetDetectedHandler")>]
member this.IsCharsetDetected : bool

Property Value

true if, and only if, this decoder has detected a specific charset

Attributes

Exceptions

if this decoder doesn't implement an auto-detecting charset.

Remarks

Tells whether or not this decoder has yet detected a charset&nbsp;&nbsp;(optional operation).

If this decoder implements an auto-detecting charset then at a single point during a decoding operation this method may start returning true to indicate that a specific charset has been detected in the input byte sequence. Once this occurs, the #detectedCharset detectedCharset method may be invoked to retrieve the detected charset.

That this method returns false does not imply that no bytes have yet been decoded. Some auto-detecting decoders are capable of decoding some, or even all, of an input byte sequence without fixing on a particular charset.

The default implementation of this method always throws an UnsupportedOperationException; it should be overridden by auto-detecting decoders to return true once the input charset has been determined.

Java documentation for java.nio.charset.CharsetDecoder.isCharsetDetected().

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.

Applies to