CharsetEncoder Constructors
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.
Overloads
CharsetEncoder(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
CharsetEncoder(Charset, Single, Single) |
Initializes a new encoder. |
CharsetEncoder(Charset, Single, Single, Byte[]) |
Initializes a new encoder. |
CharsetEncoder(IntPtr, JniHandleOwnership)
A constructor used when creating managed representations of JNI objects; called by the runtime.
protected CharsetEncoder (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Nio.Charset.CharsetEncoder : nativeint * Android.Runtime.JniHandleOwnership -> Java.Nio.Charset.CharsetEncoder
Parameters
- transfer
- JniHandleOwnership
A JniHandleOwnershipindicating how to handle javaReference
Remarks
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
CharsetEncoder(Charset, Single, Single)
Initializes a new encoder.
[Android.Runtime.Register(".ctor", "(Ljava/nio/charset/Charset;FF)V", "")]
protected CharsetEncoder (Java.Nio.Charset.Charset? cs, float averageBytesPerChar, float maxBytesPerChar);
[<Android.Runtime.Register(".ctor", "(Ljava/nio/charset/Charset;FF)V", "")>]
new Java.Nio.Charset.CharsetEncoder : Java.Nio.Charset.Charset * single * single -> Java.Nio.Charset.CharsetEncoder
Parameters
- cs
- Charset
The charset that created this encoder
- averageBytesPerChar
- Single
A positive float value indicating the expected number of bytes that will be produced for each input character
- maxBytesPerChar
- Single
A positive float value indicating the maximum number of bytes that will be produced for each input character
- Attributes
Remarks
Initializes a new encoder. The new encoder will have the given bytes-per-char values and its replacement will be the byte array {
(byte)'?'
}
.
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
CharsetEncoder(Charset, Single, Single, Byte[])
Initializes a new encoder.
[Android.Runtime.Register(".ctor", "(Ljava/nio/charset/Charset;FF[B)V", "")]
protected CharsetEncoder (Java.Nio.Charset.Charset? cs, float averageBytesPerChar, float maxBytesPerChar, byte[]? replacement);
[<Android.Runtime.Register(".ctor", "(Ljava/nio/charset/Charset;FF[B)V", "")>]
new Java.Nio.Charset.CharsetEncoder : Java.Nio.Charset.Charset * single * single * byte[] -> Java.Nio.Charset.CharsetEncoder
Parameters
- cs
- Charset
The charset that created this encoder
- averageBytesPerChar
- Single
A positive float value indicating the expected number of bytes that will be produced for each input character
- maxBytesPerChar
- Single
A positive float value indicating the maximum number of bytes that will be produced for each input character
- replacement
- Byte[]
The initial replacement; must not be null
, must have
non-zero length, must not be longer than maxBytesPerChar,
and must be #isLegalReplacement legal
- Attributes
Exceptions
if any parameters are invalid.
Remarks
Initializes a new encoder. The new encoder will have the given bytes-per-char and replacement values.
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.